in reply to Regex Hell

With the exception of the email regex, those should do what you want.

You're on your own with email if you don't have access to one of the available modules that do that already. If you can't install one, you might consider asking the system administrator to install one for you. Barring that, copying and pasting might be a better option than trying to roll your own. Checking email addresses for validity is not trivial and I, for one, won't try to interpret what you mean by "roughly validate."

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: Regex Hell
by hiddenlinux (Acolyte) on Jul 08, 2003 at 21:27 UTC
    Hi There, does \s allow tab's, character returns and other things like that? I don't want any smart-arse putting in any new-lines that would mess up my other script.
      does \s allow tab's, character returns and other things like that?

      Yes. It is the same as [\f\n\r\t ] (and it actually allows a few other characters if you are using Unicode.) You can use a literal space or an octal (\040) or hex (\x20) representation if you don't want to match the others. Since you are using /x on your regexes, I'd suggest an octal or hex escape.

      -sauoq
      "My two cents aren't worth a dime.";