Regular expression help needed
Before I upgrade my site to WP2.1, I need to replace some markup. It’s a good job I tested the new version out on a local server or I’d be screwed right now!
I need to replace this pattern:
<div class="figure"><a href=""><img src="" alt="" /></a>
With this pattern:
<p class="figure"><a href=""><img src="" alt="" /></a>
Replacing the opener is easy, but I’m going to need a regular expression to catch the closing tag too. And I know next to nothing about them!
- The topic ‘Regular expression help needed’ is closed to new replies.