Bring Application Window To Front Not Working

The moment I enable "Search Using Regualr Expression" Macro, KM does not bring Pages to front. Any idea why and how to fix this?

Paste Info to Pages.kmmacros (7.3 KB)

Have you tried the Assistance window’s “Something expected is not happening” option from the Help menu? Try that first and see if it clears anything up.

That said, rather than using a macro like this to automate finding and replacing in Pages, I think you might be better served by sticking with a macro like the one in your other recent topic that conducts search and replace entirely in the clipboard (or better, a variable) with more robust KM actions, then pasting the results back into Pages. Of course, if you have complex formatting in Pages, I can understand why that might not work for the entire document, but if it’s possible to only copy and search-and-replace select sections of the document, I can’t help but think that might still be a better option.

The solution to my problem was posted here - Find Specific Text in Clipboard and Set To Variable

Thank you.

The problem was this "using \d for Day will only match single digit days, and cause the action to fail"

You are correct, the reason why I am trying to make all of this work is becasue the Pages foratting is done in a way that I cannot figure out how to do in Markdown.