I am trying to match text after a hashtag.
Here is my current progress:
String: "Here sometext #BestRappaAlive #CategoryK #test #sadsadsadsa some more text"
Regex: /(?:#)(\w+)\b/g
Desired output: ["BestRappaAlive","CategoryK","test","sadsadsadsa"]
Current output: ["#BestRappaAlive","#CategoryK","#test","#sadsadsadsa"]
This seems trivial (I can just loop and slice) but I am curious as to where I am going wrong.
No comments:
Post a Comment