Click to See Complete Forum and Search --> : Validating texareas with PHP


Nibinaear
November 21st, 2008, 05:25 PM
I'm trying to validate some textareas but I'm coming up aggainst a problem with the newline chars. For some reason eregi, which is function I'm using can't cope with \n. People have told me to use \s to get around this but it hasn't helped and I don't know where to put it in my regexp. I find regexps really difficult, like learning a language in itself. These are the regular expressions I'm trying to use for simplicity:

"^[[:alnum:].', - /]{2,100}$"

This lets me set a datatype, extra chars, min and max length. But I just have the issue of tareas.

PeejAvery
November 21st, 2008, 09:35 PM
What exactly do you want your regular expression to do?