Sequence is c1c2c3.. -- a sequence of single characters
|
c* means "zero or more" instances of character c
|
c+ means "one or more" instances of character c
|
c? means "zero or one" instances of character c
|
All matching is greedy -- the maximum number of chars are "eaten up" starting with leftmost matching character
-
In Perl5, use ? to override greedy matching of regex parser
-
.*?: matches to first : in line while .*: matches to last : in line.
|
Curly brace notation:
|
c{n1,n2} means from n1 to n2 instances of character c
|
c{n1,} means n1 or more instances of character c
|
c{n1} means exactly n1 instances of character c
|
c{0,n2} means n2 or less instances of character c
|