This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
Regular_Expressions [2019/02/03 11:16] ccstone [Software] |
Regular_Expressions [2020/09/26 23:42] JMichaelTX [Search Modifiers] Clarify the "Global" search modifier. |
||
---|---|---|---|
Line 27: | Line 27: | ||
^Purpose^Pattern to Use^Description^ | ^Purpose^Pattern to Use^Description^ | ||
- | |Global|NONE|All searches are global in Keyboard Maestro.\\ This is often indicated in other tools by the `/g` modifier.| | + | |Global|NONE|The [[action:Search_using_Regular_Expression|Search using Regular Expression Action]] will return the _first_ match it finds in the source string.\\ In order to make it be a "global" search, you need to put this Action in a [[action:For_Each|For Each Action]] that uses the [[collection:Substrings_In|Substrings Matching in]] Collection. This will loop through all matches found in the source string.\\ This is often indicated in other tools by the `/g` modifier.| |
|Case Insensitive|`(?i)`|Matching will be in a case-insensitive manner.\\ In some Actions this is NOT necessary since the Action already provides an "ignoring case" option.| | |Case Insensitive|`(?i)`|Matching will be in a case-insensitive manner.\\ In some Actions this is NOT necessary since the Action already provides an "ignoring case" option.| | ||
|Dot includes EOL|`(?s)`|A "`.`" in a pattern will match a line terminator in the input text. Note that a CR LF pair in text behave as a single line terminator, and will match a single "." in a RE pattern.| | |Dot includes EOL|`(?s)`|A "`.`" in a pattern will match a line terminator in the input text. Note that a CR LF pair in text behave as a single line terminator, and will match a single "." in a RE pattern.| |