-
November 21st, 2008, 06:25 PM
#1
Validating texareas with PHP
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:
Code:
"^[[:alnum:].', - /]{2,100}$"
This lets me set a datatype, extra chars, min and max length. But I just have the issue of tareas.
-
November 21st, 2008, 10:35 PM
#2
Re: Validating texareas with PHP
What exactly do you want your regular expression to do?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|