Help for this page

Select Code to Download


  1. or download this
    $  perl -E 'my $c = reverse  "/foo/bar/baz/bat";  say "matched ", scal
    +ar reverse ($1)  if  $c =~ m{(.+?)/};'
    matched bat
    
  2. or download this
    $  perl -E 'my $c = "/foo/bar/baz/bat";  say "matched $1" if $c =~ m{/
    +(\w+)$};'
    matched bat
    
  3. or download this
    $ perl -E 'my $c = "/foo/bar/baz/bat";  say "matched $1" if $c =~ m{/(
    +[^/]+)$};'
    matched bat