Re:What are your Ruby Regex Idioms?
by lzell on Monday November 30, 2009 @10:15AM
(#967921)
Nice. I am intrigued by the leading underscore, are you just using that as a throwaway variable? You could get the username and domain on their own with:
And it is super readable.
[ Parent
| on HN ]
this works as well...
username,domain = */([^@]+)@(.+$)/.match("[email protected]").captures