Re: Regexp help

From: Date: Wed, 20 Oct 2004 18:43:47 +0000
Subject: Re: Regexp help
Groups: php.general 
Request: Send a blank email to php-general+get-199925@lists.php.net to get a copy of this message
> From: "Chris Boget" <chris.boget@wild.net> > Subject: [PHP] Regexp help > > What would the regex look like to accept *any* character > for a value but the total length of the value can be no greater > than 50 characters. The regex I am trying to use is as follows > > ^[\d\D\w\W\s\S.]{0,50}$ > > but it doesn't appear to be working... > Any ideas? Well, strlen() would be more appropriate than a regular expression to check for the length of a string. Wouldn't /^.{0,50}$/ work, though? ---John Holmes... (back to Cisco training... ;) UCCASS - PHP Survey System http://www.bigredspark.com/survey.html

« previous php.general (#199925) next »