I currently have a text form for users to post updates (similar to Twitter), how can I filter through the text thats submitted and return the full strings that start with #
(e.g. if a user posts “Hello World! #noob #ruby”, I would get #noob and #ruby back) I will likely save the results in a tag db column. Thank you very much for your help!
I currently have a text form for users to post updates (similar to Twitter),
Share
You can extract pattern-matching substrings out of a larger string using
String#scan