05-04-2008, 07:43 PM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
There's already a regular expression thread over here, if you like: 8 Practical PHP Regular Expressions
...what should the string accept? Just characters? or numbers as well? If I was writing a regex to, say, accept valid MD5 strings, instead of telling it what I don't want, I'd ask it to look just for what I do want, like so:
~^[A-Za-z0-9]{32}$~
...on that note yours could be the same, just swap {32} for {4,50}
-m
|
|
|
|