Wednesday, January 28, 2009


Like you have learned using the plus and star for repeating, it is also possible to specify the repetition of groups or character classes more exactly.

{20} repeat 20 times
{20,} repeat 20 times or more
{,20} repeat 0 to 20 times
{20,30} repeat at least 20 times and not more than 30 times.


Yes we can do it together!

Use the step over button in the RegExCoach to see what happens.

Another example would be to check the number of digits.



This will match any number with exactly 6 digits.

You can also use the repetition after a group () .


Yes we can do it together, can we?

The character class must match 2 or 3 times.

No comments:

Post a Comment