How Do I Use Regular Expressions (Regex) to Search/Replace on Variable That Has Special Regex Escape Characters

The escape provided by @DanThomas in Filter Variable to escape regular expression special characters - Questions & Suggestions - Keyboard Maestro Discourse needs a small, but important, change, as noted by @ Joel_Rendall:

So, using that, I found the method to work fine with your data.
Here's my example macro to illustrate this method:


Example Output:

image

MACRO:   Using Regex That Contains Meta Characters


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/c/8/c819a8a5868bbb6695022cbda27eaff3ac14a7c0.kmmacros">Using Regex That Contains Meta Characters.kmmacros</a> (4.4 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|500x1174](upload://i0cpbFbUCYMvD3NkbfEXUpq9nUl.jpeg)
 ---

Questions?