
is there a way to escape special chars
try:
$var =~ s/\W//g;
\w Match a "word" character (alphanumeric plus "_")
\W Match a non-word character
\s Match a whitespace character
\S Match a non-whitespace character
\d Match a digit character
\D Match a non-digit character
Hope this can help
Wing
Anyemail - Free E-mail Retriever, E-mail Aliases
http://www.anyemail.com/
Quote:
> Hello,
> Is there a way to escape a string containing special characters? it
> would make it easy to do regex on the string afterwards.
> Any help would be appreciated.
> Thanks.
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---