Greedy Matches : Greedy « Regular Expression « Perl






Greedy Matches

    

$p="pattern";
#A greedy match matches the entire pattern
$p =~ /(.*)/;

print "1==>$1<==\n";

   
    
    
    
  








Related examples in the same category

1.Greedy and non-greedy quantifiers
2.Greedy searches
3.The Greedy Metacharacters
4.The greedy quantifier
5.Turning Off Greediness
6.A greedy quantifier
7.Shortcut Expansion Description
8.Shortcuts for Regular Expressions
9.Shortest possible match