Help for this page

Select Code to Download


  1. or download this
        my( $quote, $quoted, $end )=  $string =~
            /(['"])((?:\\.|[^'"\\]+|(?!\1)['"])*)(\1?)/;
        die "Unclosed quote: $quote$quoted\n"
            if  $quote  &&  ! $end;
    
  2. or download this
         /(['"])((?:\\.|[^\1\\]+)*)(\1?)/
    
  3. or download this
        /(['"])((?:(?:\\.)+|[^\1\\]+)*)(\1?)/
    
  4. or download this
        /(['"])((?:(?:\\.)+|[^'"\\]+|(?!\1)['"])*)(\1?)/
    
  5. or download this
        "'" . '\vv'x35_000 . "z'"
    
  6. or download this
        my( $quote, $quoted );
        if(  $str =~ /(['"])/g  ) {
    ...
            my $end= pos($str);
            $quoted= substr( $str, $beg, $end-$beg-1 );
        }