To specify a maximum number of occurrences, use 0 as the lower bound. : Frequency « Regular Expression « Perl






To specify a maximum number of occurrences, use 0 as the lower bound.

   

/de{0,3}f/ matches d, followed by no more than three es, followed by f. 

   
    
    
  








Related examples in the same category

1.Check the frequency
2.Match zero or one characters
3.To specify a minimum number of occurrences, leave off the upper bound.
4.Checking for multiple occurrences