🦖 Tyrannosaurus Regex

Syntax Basics Island

Level 8: Hubert

8 of 13

Quantifier range: match select numbers of occurrences

The curly braces {m,n} match between m and n occurrences of the preceding element. The pattern /[a-z]{3,5}/ matches between 3 and 5 lowercase letters in a row.

Hubert loves tasty 5s, but he's on a diet, so he'll only eat numbers with 2-3 of them in a row.

Hint: you'll need to do a positive match for the dessert and a negative match for what comes before and after.

/ /

✅ Should Match (0 / 4)

2552
955501
24.556
1055501

❌ Should not Match (0 / 4)

252
90510
55555
1555551