Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
        $string =~ s/^\s+|\s+$//g;
        return $string;
    }
    
  2. or download this
    my $string = q/the users contain (bbc (333)) BLAH BLAH (ddc (223)) BLA
    +H BLAH(ccc (123))/;
    
    ...
    /x;
    
    print "Name: $+{name}, ID: $+{id}\n" while $string =~ m/$re/g;