I was wondering if anyone ever thought of either fixing or writing a
new function that would make preg_match actually work in a way that
made sense?

right now i need to pass in a optional parameter that will receive the
match, in this case one or no match, why should this not be the
function's return already?

something like:

$string = "<td>my text</td>";
$result = preg_match("/\<td\>(.*)\<\/td\>/", $string);

$result // = "my text"

Maybe something like preg_extract? I do not have the C skills to write
a patch but i think adding a new function would not break BC or have
negative side effects, would it?

-- 
Rafael Dohms
PHP Evangelist and Community Leader
http://www.rafaeldohms.com.br
http://www.phpsp.org.br

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

Reply via email to