Re: Regex

From: Date: Fri, 27 Jul 2012 19:46:04 +0000
Subject: Re: Regex
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-318582@lists.php.net to get a copy of this message
Am 27.07.2012 19:54, schrieb shiplu:
#[0-9a-zA-Z,\.]#
You should escape out that period as it will match any character otherwise. Thanks, Ash
Ash, Thats not true. In character class only meta-characters are \ ^ - [
And the dash only when it's not the first, or the last in the class.
and ]. This is the rule of PCRE (see http://www.pcre.org/pcre.txt<http://www.pcre.org/pcre.txt#CHARACTERS%20AND%20METACHARACTERS>). I assume we are talking about pcre as everybody used delimiter here which is required in pcre.


« previous php.general (#318582) next »