You should consider biterscripting ( http://www.biterscripting.com ) . It is great for parsing.
Just read the file into a string variable, then parse it away using any of their stream editor commands.
var str input ; "file.txt > $input
To get everything upto the first dot (.), use
stex "]^.^1" $input
stex = string extractor
^.^ mean . (dot) is the search string,
^.^1 means the first instance of the search string,
]^.^1 means everything up to (and excluding) the first instance of the search string,
etc. Read the help pages.