Help for this page

Select Code to Download


  1. or download this
    $string = '|123456|john+';
    /\Q$string\E/        # Strings are still interpolated,
                         # but their contents are escaped.
    
  2. or download this
    $string = '|123456|john+';
    /\Q$string/          # The \E is optional
    
  3. or download this
    /\Q|123456|john+\E/  # As long as the text doesn't
                         # contain "$", "@", the regexp
                         # delimiter (which is "/" here)
                         # or \E.
    
  4. or download this
    $string = quotemeta('|123456|john+');
    /$string/