Regex trigger capture new line

Can a regex trigger capture a new line? Say if I want to have something trigger like the following? Because I can't seem to get it to trigger when including a new line as part of the regex

\bst.(wmdy)+([a-zA-Z0-9 \n])~

With a Typed String trigger you mean?

Yes, but a return character is \r, not \n.

Also note that like Tab, while it is possible to detect it, it is also possible that Keyboard Maestro will not be able to backspace to delete the characters, and indeed the backspace may cause unintended negative consequences. For example, if you try to detect a return character in the Terminal, the command would be executed and then Keyboard Maestro would try to delete, which would actually be feeding deletes in to the running command which could have unintended consequences.

1 Like