Can anyone help me with preg_match
Posted: Sun Apr 30, 2006 12:10 pm
I'm using preg_match to validate the data i get from a html form, i use it before i use the data in a query to insert it into my database.
the regular expression i am using is "^[ \w]{2,255}+$/"
As i understand it this only allows letters and numbers of a total length of between 2-255. This is fine for most of my form however one of my fields is a textarea and can contatin multiple lines. How can i adjust my regular expression to accept return carriages.
Any help would be greatfull. Thanks
Nigel
the regular expression i am using is "^[ \w]{2,255}+$/"
As i understand it this only allows letters and numbers of a total length of between 2-255. This is fine for most of my form however one of my fields is a textarea and can contatin multiple lines. How can i adjust my regular expression to accept return carriages.
Any help would be greatfull. Thanks
Nigel