Re: Regular Expression Help

From: Date: Thu, 01 Jul 2004 00:52:19 +0000
Subject: Re: Regular Expression Help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-189402@lists.php.net to get a copy of this message
* Thus wrote Pablo Gosse: > > Here's the working regular expresssion: > > /^[a-zA-Z0-9\(\)]{1}[ a-zA-Z0-9\(\)_\,\.\-\'\"]{1,999}$/ for starters, that doesn't give me a warning at all. also, all those escapes arn't needed: $reg = '/^[a-zA-Z0-9()]{1}[ a-zA-Z0-9()_,.\'"-]{1,999}$/'; The ' is only escaped for php, not the expression. And moving the - to the end or beginning, you don't need to escape it. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#189402) next »