Add the UTF-8 modifier flag (u) to your expression:
/^\p{L}+$/ui
There is also no need to wrap \p{L}
inside of a character class.
More Related Contents:
- PHP preg_match with working regex [duplicate]
- PHP regular expressions: No ending delimiter ‘^’ found in
- Delimiter must not be alphanumeric or backslash and preg_match
- How can I convert ereg expressions to preg in PHP?
- Replacing accented characters php
- PHP preg_match to find multiple occurrences
- “Unknown modifier ‘g’ in…” when using preg_match in PHP?
- Optional Whitespace Regex
- Split camelCase word into words with php preg_match (Regular Expression)
- PHP – regex to allow letters and numbers only
- PHP preg_match to find whole words
- Replacing Placeholder Variables in a String
- Extracting all values between curly braces regex php
- Warning: preg_match() [function.preg-match]: Unknown modifier ‘/’ [duplicate]
- PHP’s preg_match() and preg_match_all() functions
- Preg match text in php between html tags
- Get repeated matches with preg_match_all()
- Unknown modifier ‘/’ in …? what is it? [duplicate]
- PHP preg_match (.*) not matching past line breaks [duplicate]
- My pattern isn’t matching a ISO style date, why? [duplicate]
- Are the PHP preg_functions multibyte safe?
- Preg_match_all
- Regular expression preg_quote symbols are not detected
- Test if a string is regex
- PHP email validation [duplicate]
- How to validate that a string only contain lowercase letters?
- How to get the shortest rather than longest possible regex match with preg_match()
- Get non-numeric characters then number on each line of a block of texf
- Detecting a url using preg_match? without http:// in the string
- Regex to match an IP address [closed]