Mega Code Archive

 
Categories / Perl / Regular Expression
 

Regular expression pattern quantifiers

QUANTIFIER             PURPOSE *                      Matches 0 or more times. +                      Matches 1 or more times. ?                      Matches 0 or 1 times. {n}                    Matches exactly n times. {n,}                   Matches at least n times. {n,m}                  Matches at least n times but no more than m times.