🦖 Tyrannosaurus Regex

Syntax Basics Island

Level 13: Mikaela

13 of 13

Parentheses: group patterns

Parentheses () are used to group patterns together. The pattern /[0-9]{5}(-[0-9]{4})?/ matches American ZIP™️ codes in both the old and new formats.

Mikaela likes to laugh.

/ /

✅ Should Match (0 / 4)

ha
hah
hahahaha
hahahahah

❌ Should not Match (0 / 4)

haaa
ahahah
ahhhhhh
ha ha ha