no, it does nothing. I tried your formula 2 ways: regex clipboard filter and using the BBEdit text factory. thank you for taking the time to think about it.
Put @Alexander’s regex in a Search and replace action and you should find that it works (assuming there are no mistakes, e.g. it’s not actually the clipboard that is being searched). See the example below. If your macro still doesn’t work, please upload it, together with an example of text that is to be searched.
thank you @ComplexPoint@kevinb@Alexander Just to let you know I am working on it. thanks very much for your posts and macros. I will give you an update.
In the end, @Alexander ‘s solution works perfectly. it was a question not of the filter itself, but the way I first copied the selected text. Simple Text and RTF (ie the copy KBM action) did not work, but all is fine with copy as Markdown which is not the default. A simple copy copied as RTF.
@ComplexPoint and @kevinb : thank you very much for the java scripts which unfortunately did not work.
thank you all 3 very very much for your efforts and insights !
I wouldn’t even take credit for Javascript that doesn"t work. I think there might have been misunderstandings about what text format you were working with:
Original post:
Latest reply:
If the original was in plain text (markdown), where does RTF come into the picture?
I see! Now I understand that “A simple copy copied as RTF” was a reference to the default option that wasn’t used in the final macro. Thanks for bearing with me.