NYCPHP Meetup

NYPHP.org

[nycphp-talk] regexp: feeling stupid

David Mintz dmintz at davidmintz.org
Wed Mar 17 14:32:34 EST 2004


I'm no guru so maybe I missed something but -- it looks like the regex
assumes all the stuff will be on a single line. If you want to allow the
possibility that there are newlines between <sup> and </sup>, add the s
modifier.

Right?

On Wed, 17 Mar 2004, David Sklar wrote:

> The regular expression '|<sup
> class="gt_article_footnote">([^</sup>]+)</sup>|'
>
> Says
>
> "match the literal text '<sup class="gt_article_footnote">' then one or
> more characters that aren't <, /, s, u, p, or >, then the literal text
> '</sup>'"
>
> You want
>
> {<sup class="gt_article_footnote">(.+?)</sup>}
>


---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list