News for hackers. Stuff that matters.
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:

  username, domain = [*/([^@]+)@(.+$)/.match("[email protected]")][1..-1]
And it is super readable.
Re:What are your Ruby Regex Idioms? by twoism on Monday November 30, 2009 @02:23PM (#968472)
this works as well...

  username,domain =  */([^@]+)@(.+$)/.match("[email protected]").captures