What Is Greedy
With regular expressions and wildcards, greedy describes a type of matching that continues looking for a match even after a match is found. For example, the below Perl greedy regular expression “.*e” matches all text up to the last letter “e” in the $example variable. This example returns “Matched: Computer Hope,” not “Compute,” because the text has multiple “e” characters. my $example = “Computer Hope”; $example =~ m/.*e/; print “Matched: $&\n”;...