Regular_Expressions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| Regular_Expressions [2026/10/07 03:50] – [Search Modifiers] peternlewis | Regular_Expressions [2026/10/08 02:41] (current) – peternlewis | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| The ICU calls these modifiers [[https:// | The ICU calls these modifiers [[https:// | ||
| - | The search modifier " | ||
| - | |||
| - | Note that matches are case sensitive by default (unless the action offers an `ignores case` option), so you can use (?i) to make the regular expression case insensitive. | ||
| ^Purpose^Pattern to Use^Description^ | ^Purpose^Pattern to Use^Description^ | ||
| Line 30: | Line 27: | ||
| |Word Boundaries|`(? | |Word Boundaries|`(? | ||
| |Comments|`(? | |Comments|`(? | ||
| + | |||
| + | Note that matches are **case sensitive** by default (unless the action offers an //ignores case// option), so you can use (?i) to make the regular expression case insensitive. | ||
| + | |||
| + | The search modifier can apply to a section of the regular expression by using the form: | ||
| + | |||
| + | ``` | ||
| + | Case Sensitive (?i:case insensitive) Case Sensitive | ||
| + | ``` | ||
| + | |||
| + | of the search modifier can apply for the remainder of the pattern (unless changed later) like this: | ||
| + | |||
| + | ``` | ||
| + | Case Sensitive (?i)case insensitive case insensitive | ||
| + | ``` | ||
| + | |||
| + | or | ||
| + | |||
| + | ``` | ||
| + | Case Sensitive (?i)case insensitive (?-i) Case Sensitive | ||
| + | ``` | ||
| + | |||
| + | For example to search for the start of a line anywhere within the pattern, for the text "Hello THERE" where THERE is case insensitive you could use: | ||
| + | |||
| + | ``` | ||
| + | (? | ||
| + | ``` | ||
| + | |||
| + | Note that `(?…)` is not a Capture Group. | ||
Regular_Expressions.1791345058.txt.gz · Last modified: by peternlewis
