I use the following code to find words that start with hashtags:
var regex = /(?:^|\W)#(\w+)(?!\w)/g;
but it only matches the English words and it can not match hashtags in other languages such as arabic. so, how can I find hashtags in a text like this:
this is a simple #text
هذا #نص بسیط