Very simple, I need to match the # symbol using a regex. I’m working on a hashtag detector.
I’ve tried searching in google and in stack overflow. One related post is here, but since he wanted to remove the # symbol from the string he didn’t use regex.
I’ve tried the regexes /\b\#\w\w+/, and /\b#\w\w+/ and they don’t work and if I remove the #, it detects the word.
You don’t need to escape it (it’s probably the
\bthat’s throwing it off):