Tim Stone's fix for patterns ending with underscore, http://meta.mathematica.stackexchange.com/a/392
some minor readability, size, and regex optimization
update user script to match
Merge pull request #4 from balpha/master

update to match the version used on mathematica.stackexchange.com