Either that or use a more conservative regex like /#[a-zA-Z0-9]+/ that only allows those characters in a hashtag. You'll be excluding emoji and stuff though