Help for this page

Select Code to Download


  1. or download this
    sub  prematch (;$) { substr((@_ ? $_[0] : $_), 0, $-[0]) }
    sub     match (;$) { substr((@_ ? $_[0] : $_), $-[0], $+[0] - $-[0]) }
    sub postmatch (;$) { substr((@_ ? $_[0] : $_), $+[0]) }
    ...
    print "`(",$`,")\n";
    print "&(",$&,")\n";
    print "'(",$',")\n";
    
  2. or download this
    prematch(He)
    match(ro)
    postmatch(, world!)
    `(He)
    &(ll)
    '(o, world!)