Help for this page

Select Code to Download


  1. or download this
    my $html = "<h1>F(oo</h1><p>Bar</p><p>Some more text here</p>";
    my @list = ('F(oo','Bar');
    ...
    #use \G to match the rest
    ($rest) = $html =~ m/\G(.*)$/;
    print $rest;
    
  2. or download this
    # s/([\$\^\*\(\)\+\{\[\\\|\.\?])/\\$1/g for @list;
    $_ = quotemeta $_ for @list;