User Tools

Site Tools


Regular_Expressions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Regular_Expressions [2018/07/09 00:08]
peternlewis Alternate Expressions
Regular_Expressions [2018/07/09 00:13] (current)
peternlewis Alternate Expressions
Line 62: Line 62:
  
 These Metacharacters offer some powerful solutions to long-standing RegEx problems. These can replace complicated RegEx patterns previously required, and are recommended for use if you are running the required versions. ​ For example, `\h` and `\R`.  ICU 55 is _not_ available in all RegEx engines. ​ A notable exception is JavaScript (and JXA), even in High Sierra. ​ So if you are using the native Keyboard Maestro Actions that use RegEx, it would be available, but not necessarily in Actions that use Execute Script in another language. ​ It is available in Execute AppleScript Actions that use ASObjC RegEx. These Metacharacters offer some powerful solutions to long-standing RegEx problems. These can replace complicated RegEx patterns previously required, and are recommended for use if you are running the required versions. ​ For example, `\h` and `\R`.  ICU 55 is _not_ available in all RegEx engines. ​ A notable exception is JavaScript (and JXA), even in High Sierra. ​ So if you are using the native Keyboard Maestro Actions that use RegEx, it would be available, but not necessarily in Actions that use Execute Script in another language. ​ It is available in Execute AppleScript Actions that use ASObjC RegEx.
- 
-[FIXME: ​ Need to confirm and complete Alternate Expressions] 
  
 ^   New Metacharacters in ICU 55+(([ICU Regular Expression Metacharacters](http://​userguide.icu-project.org/​strings/​regexp#​TOC-Regular-Expression-Metacharacters))) ​  ^^^ ^   New Metacharacters in ICU 55+(([ICU Regular Expression Metacharacters](http://​userguide.icu-project.org/​strings/​regexp#​TOC-Regular-Expression-Metacharacters))) ​  ^^^
Line 69: Line 67:
 | `\h` | `[^\S\r\n\f]` | Match a Horizontal White Space character.\\ They are characters with Unicode General Category of Space_Separator plus the ASCII tab (\u0009). | | `\h` | `[^\S\r\n\f]` | Match a Horizontal White Space character.\\ They are characters with Unicode General Category of Space_Separator plus the ASCII tab (\u0009). |
 | `\H` | `[\S\r\n\f]` | Match a non-Horizontal White Space character. | | `\H` | `[\S\r\n\f]` | Match a non-Horizontal White Space character. |
-| `\k<​name>​` | TBD | Named Capture Back Reference. |+| `\k<​name>​` | //No Alternative// ​| Named Capture Back Reference. |
 | `\R` | `(?:​\r?​\n|\r)` | Match a new line character, or the sequence CR LF.\\ The new line characters are \u000a, \u000b, \u000c, \u000d, \u0085, \u2028, \u2029 | | `\R` | `(?:​\r?​\n|\r)` | Match a new line character, or the sequence CR LF.\\ The new line characters are \u000a, \u000b, \u000c, \u000d, \u0085, \u2028, \u2029 |
 | `\v` | `[\n\r]` | Match a new line character.\\ The new line characters are \u000a, \u000b, \u000c, \u000d, \u0085, \u2028, \u2029.\\ Does not match the new line sequence CR LF. | | `\v` | `[\n\r]` | Match a new line character.\\ The new line characters are \u000a, \u000b, \u000c, \u000d, \u0085, \u2028, \u2029.\\ Does not match the new line sequence CR LF. |
Regular_Expressions.txt ยท Last modified: 2018/07/09 00:13 by peternlewis