--- W P <[EMAIL PROTECTED]> wrote: > i don't want to just escape those characters. they were merely examples. i > was hoping maybe there was some built-in way to escape ALL the characters > that mean anything to regular expressions.
Well, technically, *all* characters mean something to a regex. I assume that you want to escape metacharacters which transform the behavior of the regular expressions. perldoc -f quotemeta quotemeta will escape all non-word characters (prepend them with a backslash) which should match your needs. If that's too general, start looking at qr// and related functions. Cheers, Curtis "Ovid" Poe ===== "Ovid" on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __________________________________________________ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]