A sentence containing a single dot marks the end of the required portion of a file. It may or may not be the EOF. If I use flex and bison to parse this file, how can I match this line using some regular expression? Or is there some other way? I cannot use "." in Flex grammar as it can come anywhere in any portion, may be as a part of some word, mail id, etc.
Example: if my input file is as shown:
This is a simple file for testing. mail_id: abc@fgl.mn date: 20.09.2011 here goes some lines of information.
.
[Here there can be more sentences].
I need to parse only till that line containing that ".". How can I do that?
The regular expression:
^\.$
will match a line containing just a dot. ^
matches the beginning of a line, $
matches the end of a line.