\w er ikke nødvendigvis det samme som [a-zA-Z0-9]:
\w: Matches any word character. Equivalent to the Unicode character categories [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}]. If ECMAScript-compliant behavior is specified with the ECMAScript option, \w is equivalent to [a-zA-Z_0-9].
Jeg kender ikke ascii'er i \w, men dem i [] clause'en virker mere nøjagtige. "Nationale tegn" må være fra USA, de kunne ikke være mere selvoptagne derovre.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.