Help for this page

Select Code to Download


  1. or download this
    use re 'debug';
    $m = ' more gibberish"h" \n URL="http://[10.0.0.3]?id=80943lkjh875kjrv
    +f09u548gfpi"\n gibber\n';
    
    ...
       0 <> < more gibber>    | 34:      END
    Match successful!
    Freeing REx: `"(:?URL=\"([^\"]*)\")?"'
    
  2. or download this
    use YAPE::Regex::Explain;
    $u= qr/(:?URL="([^"]*)")?/is; # optional clause (:?xxx)?
    
    ...
    ----------------------------------------------------------------------
    )                        end of grouping
    ----------------------------------------------------------------------