0

In PHP I use this PCRE-regular expression:

\p{Ll}

And it matches lower case letters like a, b, c, but not ä, ö, ü, ß. (it correctly does not match upper case characters, numbers, etc)

See online: https://regexr.com/440eq

Why does it not match those german unicode small caps characters? And how can I make it match them?

See also the official PHP Unicode character properties documentation.

slartidan
  • 20,403
  • 15
  • 83
  • 131
  • It must be a bug -- `\p{Lu}` matches both lower and and upper case a umlaut: https://regexr.com/440f0. But it's not reproducible on [regex101](https://regex101.com/r/9HG2zG/1) – mrzasa Nov 29 '18 at 08:52
  • It matches, you miss the `u` flag. At [regex101](https://regex101.com/r/iITbUZ/1), the `u` modifier behavior is default (even if you do not select it in the UI). See https://3v4l.org/qih6M – Wiktor Stribiżew Nov 29 '18 at 08:52

0 Answers0