Would it be possible to have an extra parameter for preg_match_all() that
would allow for a maximum number of matches to be set?

Ie, with $foo = "<td>a</td><td>b</td><td>c</td><td>d</td><td>e</td>", do
something like

preg_match_all("/<td>(.*?)<\/td>/", $foo, $r, PREG_PATTERN_ORDER, 4);

, which would return only matches a thru d, but not e. I think this might be
useful (especially to cut execution time).

Regards,

Manuzhai



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to