Regex match Arabic keyword
问题 I have simple regex which founds some word in text: var patern = new RegExp("\bsomething\b", "gi"); This match word in text with spaces or punctuation around. So it match: I have something. But doesn't match: I havesomething. what is fine and exactly what I need. But I have issue with for example Arabic language. If I have regex: var patern = new RegExp("\bرياضة\b", "gi"); and text: رياضة أنا أحب رياضتي وأنا سعيد حقا هنا لها حبي The keyword which I am looking for is at the end of the text.