in reply to Re: Regex Hell
in thread Regex Hell

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.

Replies are listed 'Best First'.
Re: Re: Re: Regex Hell
by sauoq (Abbot) on Jul 08, 2003 at 21:45 UTC
    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.";