in reply to regexp w/ special chars

$string =~ s/\Q$token\E/$date/;

\Q quotes metacharacters in a regex and \E ends the quoting. See perlre

Replies are listed 'Best First'.
Re: Re: regexp w/ special chars
by LanceDeeply (Chaplain) on Aug 27, 2003 at 20:09 UTC
    nice!

    thanks for link, i'm an re noob.