Splitting @xyz from email id: username@xyz.com

here's a quick and dirty regex, might need to be improved

'user.name@domain.com' =~ /(\S*)@/

the resulting 'user.name' value will be stored in $1

Adam