How to check if a string is a valid hashtag in JavaScript?
Originally Published Here ๐!
To check if a string is a valid hashtag, we can use a regex expression to match for a string that starts with a # (hash symbol) in JavaScript.
TL;DR
// Regular expression to check if string is a hashtag
const regexExp = ...
melvingeorge-me.hashnode.dev2 min read