I am curious, is there a faster/better way to parse hashtags in a string, other than using Regular Expressions (mainly in Ruby)?
Edit
For example I want to parse the string This is a #hashtag, and this is #another one! and get the words #hashtag and #another. I am using #\S+ for my regex.
You don’t show any code (which you should have) so we’re guessing how you are using your regex.
#\S+is as good of a pattern as you’ll need, butscanis probably the best way to retrieve all occurrences in the string.Yes, I agree.
/\B#\w+/makes more sense.