Help for this page

Select Code to Download


  1. or download this
    m#this#;
    s!foo!bar!;
    s{this}<that>;
    m!word/word/word/word!
    
  2. or download this
    my $sting = 'all the metachars |+*?(){}-[]^$.   ';
    $regex_safe = quotemeta $string;
    ...
    
    # to do what you want perhaps you might use...
    m!(?:[\w ]+/){3}[\w ]+!;