Re: The difference between ereg and preg?

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

 



Robert,

Thank you for replying.

Check out the greediness modifier. Greediness determines whether it
extends the matching to the largest possible match or the smallest
possible match. By default regexes are greedy.

By "greediness modifier", do you mean the preg_set_match, the preg_set_order, and preg_pattern_order arguments?

The documentation on the PHP site does mention the term "greedy", but to me it's not very clear about explaining which modifiers are responsible for which behaviour.

I've experimented with each, and to me it seems like they all behave the same, so perhaps "greediness" is determined by some other modifier?

--
Dave M G

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