Re: Regular expressions
| From: | Richard Lynch | Date: | Tue, 17 Oct 2006 17:25:32 +0000 |
| Subject: | Re: Regular expressions | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243256@lists.php.net to get a copy of this message | ||
On Mon, October 16, 2006 4:01 pm, Curt Zirzow wrote:
> That makes me wonder.. according to the docs U inverts greediness, if
> you have...
> /foo.*?bar/U
>
> does that make .*? a greedy .*
I believe I stubbed my toe on that fact once, yes...
I always manage to mess up the greedy/ungreedy stuff, and then throw
up my hands and try to use an expression to look for a specific
character to be there or not there, and then I don't have to worry
about the greedy stuff as much...
Sometimes, though, you have to grit your teeth and dink with ? and U
until it works.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?