Level 3
Try this
[a-zA-Z,\-'.()*\p{L}]
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to validate a field allowing a-z and some common punctuation , . - ' in addition to international unicode characters.
I tried various ways and all fail. This is where I left off with my attempt
$regexp = "/^[a-zA-Z ,-'. \p{L}]+$/ui";
Any help would be appreciated.
Thanks, Dave
Please or to participate in this conversation.