i have a js function that working in english but i get error in hebrew
the function match all the words in string that inside {{ }}
and return the word inside the double curly bracket in a array
without the curly bracket
the string can Contains both english and non english words like this: {{test}} {{בדיקה}} hi this is my test {{test2}}
var str_eng = "{{test}} {{test1}}";
var str_non_eng = "{{בדיקה}} {{עעע}}";
str_eng.match(/{{\s*[\w\.]+\s*}}/g).map(function(x) { return x.match(/[\w\.]+/)[0]; }) //array[ "test","test1" ] //ok
str_non_eng.match(/{{\s*[\w\.]+\s*}}/g).map(function(x) { return x.match(/[\w\.]+/)[0]; }) // error not working
Thanks!