You need to look at java.util.regex which contains the SDK's regular expression classes. At least I think you do - but then I've no idea what a .dco file is so you might be asking something completely different.
thanx 4 ur reply...by .doc i mean any MS word document...infact i want to make a programme that will read in a word file and pull up all the keywords that a user can use for searching that document...like wat is done in google search engine...i made a search engine but that will be too tiring process to manually feed aal the related keywords in the database so that document is availabe when searched.
POI HWPF is in a very-alpha state and is not under active development but it will let you read the contents of a word doc (get the latest version out of SVN). If you are doing anything more complex (editing, converting), I recommend Open Office.