I am facing an issue with RegExp not identifying special characters as word characters (or incorrectly counting them as \b
):
"wäww, xöxx yüyy zßzz".replace(/\b\w/g,function(m){return m.toUpperCase();})
expected result:
"Wäww, Xöxx Yüyy Zßzz"
current result:
"WäWw, XöXx YüYy ZßZz"
I have experimented with different encodings but without success...
How can I fix this issue and make it recognize the characters correctly or find a workaround?
A similar problem is discussed in another question on Stack Overflow with no satisfactory solution.