Re: Regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, October 16, 2006 2:54 pm, Chrome wrote:
> *edit* sorry I didn't think and just hit reply on this instead of
> reply
> all... sorry Richard */edit*
>
> [snip]
> .*? is kinda silly -- .* mean "0 or more characters", and ? means
> "maybe"
> but putting them together has no added value, so lose the ?
> [/snip]
>
> I could be wrong (and under the considerable knowledge of Richard I
> certainly feel it :) ) but doesn't the ? after a quantifier signify
> that
> preceding pattern is to be taken as ungreedy?

You're right; I'm wrong.

I'm not PCRE expert.

Took me 20 years to be able to stumble through the simplest expressions.

? means "maybe" in some other place in PCRE.  Or maybe that's POSIX. 
Never have figured that one out.

-- 
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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux