Not a problem. Try plugging these regular expressions into a "Search and Replace [Variable/Clipboard]" action (depending on what you're using to store this list):
Happy to help! Regular expressions can be maddeningly opaque until they click, but even simple ones like this can be very useful, in KBM and many other places.
really thank you so so much. as complicated as my macro is, this was the one thing I just couldn’t seem to find any simple documentation on, and the one thing leaving a gap between AppleScript and KBM. now that this works my whole macro can be finished, saving me countless hours of time and frustration
Generally, if you’ve hit a block and can’t get past it for more than 30-60 minutes, it’s time to post on the forum. Even if you continue and then find a solution, you can then post your own answer and help the next person.
Regular Expressions are a great tool, and a skill well worth learning, even though there is a definite learning curve involved. The time invested will likely be paid back many fold (it’s a bit like Keyboard Maestro itself really).
Post your macro (instructions here) so people can take a look -- while it sounds like you're doing everything right, maybe you've a mis-set action option somewhere.
Are you using any other clipboard utilities, like Pastebot or similar? Always good to include a note of such if you're having Clipboard issues.
Generally it's better to use the Copy and Paste actions instead of simulating Cmd-C and Cmd-V – because they have built-in pauses and are designed to work in the Keyboard Maestro context.
It's all too easy to have timing issues with simulated keyboard commands.