I have a comma separated CSV file contains NASDAQ symbols . I use Scanner to read a file
s = new Scanner(new File(\"C:\\\\nasdaq_companylist.csv\")).useD
Unless this is homework you should not parse CSV yourself. Use one of existing libraries. For example this one: http://commons.apache.org/sandbox/csv/
Or google "java csv parser" and choose another.
But if you wish to implement the logic yourself you should use negative lookahead feature of regular expressions (see http://download.oracle.com/javase/1,5.0/docs/api/java/util/regex/Pattern.html)