Help for this page

Select Code to Download


  1. or download this
        if($text =~ $pattern){
            print $&; #prints entire match
    
  2. or download this
        if($text =~ /($pattern)/){
            print $1; #prints entire match
    
  3. or download this
        if(my ($match) = $text =~ /($pattern)/){
            print $match; #prints entire match