Re: Regexp help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: "Chris Boget" <chris.boget@xxxxxxxx>
> Subject:  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux