Wiki Update -- RegEx ICU 55 Metacharacters



Submitted for your review, comment, and/or revision, the following Wiki article has been updated:

Regular Expressions -- ICU 55+ Metacharacters

Primary Changes:

  1. Added this section

I added this to make it easy for everyone to find and learn about these new Metacharacters, like \h and \R, and to know which software versions they are available in.

Needs careful and thorough technical review.

I entered the best information I have, based on the sources cited, and on this topic: RegEx for Horizontal Whitespace.

I'm sure some of you will remember the long discussion we had there, and the difficulty in arriving at a consensus. So please give this a good review.

In particular, it needs:

  1. Confirm/Correct the first version of KM it was available in
  2. Confirm and provide the Alternate Expressions.

I'd like all to review for clarity, but especially if you are relatively new to RegEx.

You can either post your suggested changes here, or if you are a wiki editor, you can make the changes and notify us here.


RegEx for Horizontal Whitespace (\s \h \t blank etc)

It looks good. I removed the specify of version of Keyboard Maestro - which version of Keyboard Maestro you use is irrelevant. Only which version of macOS you use, because it controls the regex engine used. Keyboard Maestro will use the system regex engine. So Keyboard Maestro 6.x on macOS 10.11+ can use the facility, while Keyboard Maestro 8.x on macOS 10.10 cannot. The version of Keyboard Maestro doesn't matter for this.

If [^\S\r\n\f] works for \h, then I presume [\S\r\n\f] works for \H since they are inverses.

Similarly, if [\n\r] works for \v, then I presume [^\n\r] works for \V.

I don't believe there is an alternative for back references to named capture groups (which I don't think Keyboard Maestro supports anyway, although the named capture group and back references available in 10.11+ will work fine).


Thanks. That is good to know.