I use Rubular all the time for testing my regexes with ease. Give it a shot, its really well done:<p><a href="http://rubular.com/" rel="nofollow">http://rubular.com/</a>
I didn't see it mentioned, but, btw, this code allows a method to introspect to figure out what the method name that's currently being executed.<p>caller[0][/`([^']*)'/, 1]<p>Note that you only need to do this for Ruby 1.8. In Ruby 1.9, there will be a __method__() and __callee__() method that does the same thing.