1
var word=/@(\w+)/ig; //@abc Match

How do I get this code to work with ÅÄÖ

Smixen
  • 51
  • 8
  • possible duplicate of [Regex - What would be regex for matching foreign characters?](http://stackoverflow.com/questions/3009993/regex-what-would-be-regex-for-matching-foreign-characters) – Jay Blanchard Oct 02 '14 at 17:33
  • Try to use this regex: `/@([\u00C0-\u00ff]+)/g`. This will match tons of other useless cr*p (`çÇáÀãï` and others) but works as intended. If you check for that codepoint interval, you can tune it to your specific task. – Ismael Miguel Oct 02 '14 at 17:50

1 Answers1

0

You would need to use \p{L} in regex if you wanted to match are letters

Have a look here for a detailed info

Community
  • 1
  • 1
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26
  • i havnt tried this..actually..am not that good in regex too..when i searched i got this thats why i mentioned as an answer here ..lets check if it was helpful for op.. – Avinash Babu Oct 02 '14 at 17:47
  • Try this in your console: `/@(\p{L}+)/.test('@\p{L}')` (should return `true`). If it returns `true`, it's not helpful. – Ismael Miguel Oct 02 '14 at 17:48
  • Hi I am really bad with regex how should I edit my current regex code? var word=/@(\w+)/ig; – Smixen Oct 02 '14 at 18:38