Timwi wrote:
Brion Vibber wrote:
Changed it to /^([á|ð|é|í|ó|ú|ý|þ|æ|ö|a-z]+)(.*)$/sD , works like a charm
You want just: /^([áðéíóúýþæöa-z]+)(.*)$/sD
That won't work with UTF-8.
Brion, you're too quick to reply again. I have to admit that I didn't think of UTF-8, but:
(a) it *does* work with UTF-8, albeit accidentally, and
It will catch the correct characters, but also incorrect characters. False positives are not correct functioning.
(b) either way it's more correct than the other version. You do *not* want a "|" character inside square(!) brackets.
Quite right about the first version, but unrelated to the correctness of the second version.
Given the concerns with UTF-8, Ævar, I suggest you use:
/^((?:á|ð|é|í|ó|ú|ý|þ|æ|ö|[a-z])+)(.*)$/sD
As already established in the other language files.
-- brion vibber (brion @ pobox.com)