The simple-flat-files vocab is more special-purpose; I wrote it to parse a file format that seemed to come up in multiple applications, but it's not for everything.
To parse a text file with fixed-length fields, your best bet is to use the words in the sequences vocabulary. Once you have the line as a string, you can call the word 'cut' on it to split it into two pieces, dividing at a particular index. From here, you can do further processing on the fields. If there are several fields, all of the same length, the 'groups' word divides a sequence up into subsequences of a given length. There are probably other sequences words that you will find useful, and it's all pretty well-documented. Dan On Tue, Oct 6, 2009 at 12:14 PM, Jon Harper <[email protected]> wrote: > the "parsing simple flat files" help article might help > > On Wed, Oct 7, 2009 at 12:48 AM, Stephen Veit <[email protected]> > wrote: >> I want to parse text data files with fixed-length fields. Is there a >> vocabulary that I should look at? If not, I will start writing my own. >> Thanks. >> >> -- >> Stephen Veit >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Factor-talk mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/factor-talk >> >> > > > > -- > Jon Harper > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
