Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Beginning Regular Expressions 2005.pdf
Скачиваний:
95
Добавлен:
17.08.2013
Размер:
25.42 Mб
Скачать

Metacharacters and Modifiers

Figure 4-21

Modifiers

Modifiers, as their name suggests, modify how a search is carried out. The description here focuses on the tools that are being used in demonstrating regular expression examples. Similar modifiers are available in the programming languages considered later in this book.

Global Search

The global search modifier determines whether a single match is found or whether all matches should be looked for. When used as part of search-and-replace functionality, the global modifier determines whether one occurrence of the target text is replaced (with the global modifier off) or whether all are (with the global modifier on). Individual programming languages have their own syntax for expressing a global search.

103