RegEx: Global and Wiki

We don’t need to document it on the wiki, it is perfectly well documented in the Help menu which leads to:

ICU Regular Expression Reference

Which answers all of your questions:

  • What flavor of RegEx? ICU.
  • How do you get greedy? All regex modifiers are greedy by default.
  • So how do you get non-greedy? Add a ?. Eg, “a.*?b”.
  • Can we use “RegEx” on the wiki? No, I don’t generally abbreviate things in formal documentation. Here is fine, use whatever you like, even RE on occasion is sufficient. Same for using “KM” for Keyboard Maestro.
  • Maybe there would be sense in duplicating the Glossary from the documentation on the wiki (probably not, but maybe), or add the term RegEx to the Glossary (probably).

You can see that the pattern match is greedy because the \d+ matches all three numbers “123”. If it was not greedy, it would match only 1.

You are talking about “global” not greedy. You cannot match globally in a Search Variable action - where would you put all the matches? If you want to match multiple times (globally), we all know what action to use whenever there are multiple things, right? The For Each action. Then you can iterate over all the RegEx matches using the Substrings In collection.