- + matches 1+ times
- * matches 0+ times
- {3} after a charater matches it 3 times
- {2,3} after a charater matches it 2 to 3 times
$x = "one
two
";
#.* is greedy, so this matches from the firstto the last
$x =~ m#.*
#x
#.*? isn't greedy, so this matchesone
only
$x =~ m#.*?
#x
No comments:
Post a Comment