I want to find all #tags in a piece of text (using javascript) and use them. The regex myString.match(/#\w+/g) works, but then I also get the #. How can I get only the word without the #?
I want to find all #tags in a piece of text (using javascript) and
Share
You can do something like this:
The
(and)denote groups. You can then access these groups and see what they contain. See here and here for additional information.