Explain, please, why the word boundary \b does not work for Russian words, at a time when it works for English.
var str = "one один two два three" var work = str.match(/([\w])+\b|([а-я])+/giu); console.log(work, ":Без \\b для русских слов:"); //вот тут var notWork = str.match(/([\w])+\b|([а-я])+\b/giu); console.log( notWork, ":c \\b для русских слов:");
umodifier to help you. - Edwarduflag does not help. Updated the question and added it to the code. - Dmytryk