tagger

This is a static utility class for extracting tagged information from text. It is very convenient when another input box on a form would be overkill.

Usage

ruby Tagger.tags(string_to_be_processed) # Looks for tags in the passed string of the format "#abc_123" and returns them. Tagger.handles(string_to_be_processed) # Looks for handles in the passed string of the format "\@abc_123" and returns them. Tagger.prices(string_to_be_processed) # Looks for prices in the passed string of the format "\$99.00", "\$99", or "\$.99" and returns them.

Note

This is not a gem so just include the code in your app structure however you see fit.

License:

No license file included, but I hereby give you permission to use, reuse, and abuse this code as much as you want.

Author: Matthew Sullivan