Yo. I’m trying to parse some simple HTML and I have a recurring question that keeps coming up (I’ve been doing multiple RegExp matches but I’m hoping for a better solution).
So, I’m using the following Pattern:
((<(b|em)>).+?((</(b|em)>)))
Against the following simple markup:
<b>Dialogue Between Franklin and the Gout </b><p>Nuther Paragraph</p><em>by Benjamin Franklin </em>
Using Reggy, I see that I’m getting each of the matches I want (<b>Dialogue…</b> and <em>by Benjamin…</em>, but I want just what’s enclosed in my <b>/<em> tag. I see Back Reference mentioned, but haven’t been able to wrap my brain around it (and I’m not sure if that’s what I need to use).
Any suggestions? TIA!!!
Ciao,
-Jei.