CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    438

    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.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    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
  •  





Click Here to Expand Forum to Full Width

Featured