1
3
I've read about 15 tutorials on regular expression however I'm clearly not getting as I've been unable to tailor it to my problem.
I have one set of code which would be found in many different documents. There may be variants of these with different content between the two anchor tags, but here is one variant (the others are all of similar form).
[anchor=ad1][img]http://i.imgur.com/48rwaraw.png[/img]
[URL=http://goo.gl/Ii3WNz][img]http://i.imgur.com/rBbf7nM.png[/img][/URL]
[size=7pt]Advertised sites are not endorsed and may be unsafe, untrustworthy, or illegal in your jurisdiction. [url=http://goo.gl/aw52j52]Advertise here.[/url][/size]
[img]http://i.imgur.com/48rwaraw.png[/img][anchor=ad1end]
I want to be able to replace everything between the anchor tags, ie where my * is here:
[anchor=ad1]*[anchor=ad1end]
The replacement would include similar characters to the original, if that makes a difference. I just can't seem to get the regular expression stuff to find the correct string, nevermind replace it with another. Thanks for the help.
Edit: Using ToolBucket to use multiline
1How to use regular expressions in Notepad++ (tutorial) – DavidPostill – 2015-02-19T12:43:10.700
1As I said, I've read about 15 of these and it doesn't help me. When I follow what appear to be the rules, I get unexpected results which aren't close. – Adam – 2015-02-19T13:01:36.413
Have a look at this solution: http://superuser.com/a/482293/300393 It's somewhat related, but does not solve Your problem completely.
– Dmytro Dzyubak – 2015-02-19T13:20:56.997You should have stated in your question, what you'd tried, and what was confusing you. – barlop – 2017-01-04T11:51:18.737