- #1
SlurrerOfSpeech
- 141
- 11
What I'm ultimately tried to do is get the
from an expression like
This expression is in a much larger piece of text but is the only time an expression of this exact form is in it. I'm using
to get the expression and
to get
, but I actually want what's BETWEEN the tags.
Code:
Some Guy, Some Other Guy, Some Guy 2, Some W. Bush
Code:
<h2>Friends</h2><ul><li>Some Guy</li><li>Some Other Guy</li><li>Some Guy 2</li><li>Some W. Bush</li></ul>
This expression is in a much larger piece of text but is the only time an expression of this exact form is in it. I'm using
Code:
(?s)<h2>Friends</h2>.*?<ul>.*?</ul>
to get the expression and
Code:
<li>([a-zA-Z0-9. ]+)</li>
to get
Code:
<li>Some Guy</li>, <li>Some Other Guy</li>, <li>Some Guy 2</li> and <li>Some W. Bush</li>