Help for this page

Select Code to Download


  1. or download this
    16:12 >perl -wE "my $string = 'abcde'; $_ = 42; say; $string =~ /(?{ s
    +ay })/;"
    42
    ...
    16:12 >perl -v
    
    This is perl 5, version 22, subversion 0 (v5.22.0) built for MSWin32-x
    +64-multi-thread
    
  2. or download this
    use strict;
    use warnings;
    ...
        $x = $_;
        print "$_: ", $searches{$_} =~ $regex ? 'match' : 'no match', "\n"
    +;
    }
    
  3. or download this
    my $regex = qr{ ^ \s* (??{ $_ }) \s* $ }x;