note 22193 added to function.preg-match

From: Date: Mon, 10 Jun 2002 10:57:52 +0000
Subject: note 22193 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-31656@lists.php.net to get a copy of this message
To avoid the double escaping you can also just use single quotes, only it prevents from inserting variable data since '$foo' is interpreted as string $foo and not variable $foo. preg_match('/^[$oi]$/', $foo, $matches); Won't look for variable $oi but one of the three characters $, o or i. -- Simon -- http://www.php.net/manual/en/function.preg-match.php http://master.php.net/manage/user-notes.php?action=edit+22193 http://master.php.net/manage/user-notes.php?action=delete+22193 http://master.php.net/manage/user-notes.php?action=reject+22193

« previous php.notes (#31656) next »