in reply to Regex: How do I use lookahead with search/replace?

Here's a simple regex solution I came up with. It's off the cuff and has a few quirks, but it might give you some ideas:

local $_ = do { local $/ = undef; <DATA> }; s[ (?<=>) # start at an '>' ([^<]+) # match all the following non '<' chars ] [<b>$1</b>]gx; print; __DATA__ <p> blah blah <blockquote> blah </blockquote> blah <p>

And the output is:

<p><b> blah blah </b><blockquote><b> blah </b></blockquote><b> blah </b><p><b> </b>

You'll note the fact that the <b>'s get inserted before and after the newlines in a strange fashion. That's one of the quirks. Another one is the <b> at the end that encloses nothing except a newline. This is because [^>] matches any character, including a newline character. You can tweak to suit if this is a problem.