What is the difference between \"\\\\w+@\\\\w+[.]\\\\w+\" and \"^\\\\w+@\\\\w+[.]\\\\w+$\"? I have tried to google for it but no luck.
\"\\\\w+@\\\\w+[.]\\\\w+\"
\"^\\\\w+@\\\\w+[.]\\\\w+$\"
Try the Javadoc:
http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
^ and $ match the beginnings/endings of a line (without consuming them)
^
$