Hi,
I am trying to get some annoying tasks less tedious, and often this involves replacing parts of some text string and putting it back.
I keep running into small issues in how Keyboard Maestro deals with the regex (I'm not very good at it, so it's probably me) and was wondering if anyone could assist in a seemingly small but rather important part.
If I create a regex to capture some groups, and then I want to replace one of those groups I run into problems.
Example:
Search for: (somestring)(\d*)
Now I want to replace the 2nd Captured Group with a specific number instead of whatever is there.
In several text editors where I've tested this I can use the following replace statement: ${1}1000
This results in getting "somestring1000" added. The {} isolates the captured group and lets me combine it with a string. However, if I do this in Keyboard Maestro it doesn't work. I've tried other characters, and I've tried using named groups, but nothing seems to work. The result is always the actual "string" I've got in the "replace with". So it replaces with for instance "${1}1000" instead of "somestring1000".
I'm sure this is some stupid oversight on my part, but any advice would be really appreciated!
EDIT: I use TextMate as my primary Text Editor for these kinds of things, and it supports the samples mentioned above.
[Moderator's Note: @peternlewis has accepted a feature request for the next major version of Keyboard Maestro. See:]