I would like to use PHP’s preg_match_all to capture substrings which comprise:
- A-Z, a-z, all accented chars;
- space;
- hyphen.
It must not capture strings with anything else in them, including numeric chars.
This example is close but also catches strings containing numeric chars:
preg_match_all("/([\w -]+)/u", $abigstring, $matches);
That’s a job for Unicode properties:
\p{L}matches any character with the Unicode property “Letter”.