[thelist] PHP RegEx
Anthony Baratta
anthony at baratta.com
Wed Jul 11 11:50:48 CDT 2007
Can you post the actual regEx and a few examples of strings you are searching?
-----Original message-----
From: Jon Molesa rjmolesa at consoltec.net
Date: Wed, 11 Jul 2007 09:46:56 -0700
To: TheList thelist at lists.evolt.org
Subject: [thelist] PHP RegEx
> Hey guys I posted this on regex at gogolegroups.com also, but not sure how
> used that list is.
>
> I can't understand why when I use
>
> preg_match_all('/(regex)/', 'text string', $matches, PREG_SET_ORDER)
>
> that the entire regex gets returned in the array $matches. Even if
> I use (?:regex) on the whole regex I still get the whole thing back.
> Is there and way to drop that part? I know I could just ignore it,
> when looping through the array, but I'd like a bit more control over it.
>
> It just seems as if I'm getting back more than I should.
> Thanks.
>
> --
> Jon Molesa
> rjmolesa at consoltec.net
> if you're bored or curious
> http://rjmolesa.com
> --
More information about the thelist
mailing list