Mega Code Archive
Categories
/
Php
/
Strings
Finding Matches Globally with preg_match_all()
$text = "take, tart, till"; if ( preg_match( "/\bt\w+s\b/", $text, $array ) ) { print "
\n"; print_r( $array ); print "
\n"; } ?>