TIL: in javascript regexes, \b (word boundary) matches between an umlaut and a regular letter:
"aaäaaöaa".replaceAll(/\b\w/g, (x) => x.toUpperCase()) results in "AaäAaöAa"
TIL: in javascript regexes, \b (word boundary) matches between an umlaut and a regular letter:
"aaäaaöaa".replaceAll(/\b\w/g, (x) => x.toUpperCase()) results in "AaäAaöAa"
@timotimo it looks like that matches ASCII only, in that sense, that is broken in JS. Likely what you think as umlaut is actually non-ASCII and it is not DWIM.
ASCII operations like that should not exist in todays world, but this is JS, expect many broken parts in there, mostly silent, like this.
If there is some sort of a REPL with debug mode, that will likely show you that what JS regex engine see is something like this "aaäaaöaa"