I am struggling with extracting hashtags from a string in JavaScript. My goal is to extract the text starting from the # character but stopping at the first special character.
For example:
String: This is a #first./23k%^ hashtag
Required extract: #first
String: This is another test #hashtag/';123one
Required extract: #hashtag
I have searched extensively on how to achieve this, but I have not been able to find a solution. Any assistance would be greatly appreciated.