-1

I have a regex to found charakters in a string:

^[A-Za-züäöÜÄÖ$@߀0-9\.\-_ \&\<\>\=\`\:#\{\}\,\(\)\"\'\+\]\[\/%;!?\\\n]{0,20000}$

When I become a name with js from a file like 'tüst.txt' the regex not match the 'ü' in the string.

How can I found the 'ü' in the filename? Or the other umlauts?

thank you in advance

vDrews
  • 155
  • 5
  • 14

1 Answers1

0

This answer suggests using unicode characters instead of actually putting an umlaut into your regex. Its unicode is \u00fc - the linked answer includes a table of other common german characters, and a comment on that answer includes a link to a unicode table.

There's a lot you can do with unicode in javascript - it's worth reading more about!

Nick Reed
  • 4,989
  • 4
  • 17
  • 37