Help for this page

Select Code to Download


  1. or download this
    Regex        Result
    (.*)(\d*)    'I have 2 numbers: 53147', ''
    ...
    (.*?)(\d*)    '', ''
    (.*?)(\d+)    'I have ', '2'
    (.*)(\d+)$    'I have 2 numbers: 5314', '7'
    
  2. or download this
    use strict;
    my @re= qw|
    ...
      my $r=qr|$_|;
      print "$_\t'", join( "', '",$test=~/$r/),"'\n";
    }