"mike" <mike_newsgroups@newsgroup> wrote in message
news:627cb2fa-822f-4930-92cf-62e53706dc86@newsgroup
> In the pattern below, I am trying to grab everything between the </
> span></h2> tags and [ <h2> OR <div class="footer"> ]
>
> preferably, if <h2> exists, it would match <h2>, if not, it would
> match <div class = "footer">
>
> pattern = "<\/span><\/h2>([\s,\S]*?)<h2>|<div class=""footer"">"
>
> How do I get the OR to work properly between <h2> and <div class =
> "footer"> ?
>
> Thanks for your help! This seemed to work for me:
pattern = "<\/span><\/h2>([\s,\S]*?)(<h2>|<div class=""footer"">)"
The parentheses make it clear what is being OR'd.
--
Richard Mueller
MVP Directory Services
Hilltop Lab -
http://www.rlmueller.net
--