PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
What about punctuation? Shouldn't we be able to have punctuation in our text? What about accent characters. Some words we use can have accent characters in them.