functions-online

preg_match_all

description

Searches $subject for all matches to the regular expression given in $pattern and puts them in $matches in the order specified by $flags.

After the first match is found, the subsequent searches are continued on from end of the last match.

declaration of preg_match_all

int preg_match_all ( string $pattern , string $subject , array &$matches [, int $flags ] [, int $offset ] )

test preg_match_all online













share preg_match_all

comments for preg_match_all

On 25. Jun 2014 16:44 Rasmus wrote:

@Mejicano, I use regexr.com/v1 to test new regex expressions. They've a newer version in javascript, but it doesn't support lookbehinds.

On 29. Feb 2012 09:45 Mejicano wrote:

Is there any tool that may help me easily create regex to use with preg_match_all, some kind of designer? I frequently need to use preg_match_all and I'm not that good, I'm not a programmer either. Or at least a link where I could learn advaced stuff in a easy way. Thank you

On 13. Feb 2012 19:22 butzi wrote:

@sheila: to find the date in a string, you can use this: @([a-zA-Z]{3}/[0-9]{1,2}/[0-9]{1,2})@ to find the parts of the date you can use this: @([a-zA-Z]{3})/([0-9]{1,2})/([0-9]{1,2})@

more comments for preg_match_all

There are some more comments for preg_match_all(). To see them all click here.

+

Leave your comment