preg_match
description
Searches $subject for all matches to the regular expression given in $pattern and puts them in $matches in the order specified by $flags.
Durchsucht $subject nach allen Übereinstimmungen mit dem in $pattern angegebenen regulären Ausdruck und legt sie in der durch $flags festgelegten Reihenfolge in $matches ab.
Busca en $subject por una coincidencia ($matches) con la expresión regular dada en $pattern.
Analyse $subject pour trouver l'expression qui correspond à $pattern.
Pesquisas $subject para um jogo, para regular a expressão dada em $pattern.
declaration of preg_match
int preg_match ( string $pattern , string $subject , array &$matches [, int $flags ] [, int $offset ] )
test preg_match online
share preg_match
comments for preg_match
On 08. Mar 2013 11:14 butzi wrote:
@brunchika: You do not need to add Quotes on the pattern, but you are required to use delimiters by default of PHP. Try pattern: /test/ subject: asdftestasdf and click run.
On 03. Mar 2013 13:58 brunchika wrote:
Good testing functionality, however, I noticed that the input in the $pattern field must be within single or double quotes otherwise an error is posted. Curiously however the $subject field doesn't have to be within quotes. So that was the bit of inconsistency I noticed. Note: The quotes on both fields are added automatically after the run button is pressed therefore why the need of quotes in the $pattern input field?
On 31. Dec 2012 09:42 javilumbrales wrote:
Really useful, thanks!!!!!!!!
more comments for preg_match
There are some more comments for preg_match(). To see them all click here.