Regexdrill

Level 1: Basics Exercise 5 of 52 Free

Negated class: no vowels

A regex exercise from Regexdrill. Solve it with a pattern box with live highlighting in your browser, checked against hidden test strings, and it is checked the moment you submit.

The task

The whole line must match. Match lines that contain none of the lowercase vowels a, e, i, o or u. Any other characters are fine, including uppercase letters, digits and spaces.

What this exercise teaches

[^aeiou]+ repeats any character that is not a lowercase vowel, so the line passes only when no vowel appears in it.

A hint if you get stuck

A caret right after the opening bracket flips the set: [^abc] means any character except a, b or c.

Try it now, no account needed

This exercise is free. Open it on the practice page, solve it, and get instant feedback with a hint and a worked solution after two tries.

Open this exercise

More exercises in Basics