Regexdrill

Level 5: Advanced Exercise 51 of 52 Pro

Unicode letters with the u flag

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 a single word made only of letters from any language, such as café or Zoë. Digits, spaces and punctuation are not allowed.

What this exercise teaches

\p{L}+ with the u flag accepts letters from every alphabet. Without the u flag, \p is not a property escape at all.

A hint if you get stuck

\w only covers ASCII letters. With the u flag, \p{L} means any letter in any script.

This exercise is part of Pro

Pro unlocks all 52 exercises, with worked solutions and progress saved to your account. The free exercises work without an account.

You create a free account first, so Pro is attached to it.

Monthly is charged today and then every month until you cancel, in one click from your account page. Lifetime is one payment with no renewals. Full refund within 14 days of paying.

Start with the free exercises

More exercises in Advanced