regular expression, non-greedy *

<a href="htt[^"][^"]*?"> This does work to nail down the type B links.

Now, if I wanna add [target="_blank"] to the back of those B links, Find and Replace will simply paste the regex, how should that be done?
 
Depends on the language. With regex you could use parameters to catch the string, if your library supports it. You could also catch the substring index/length and use some Mid function to get the string.

A very simple solution if you don't want to program it would be to use sed to preprocess. Sed can extract and transform most simple cases.
 
Back
Top