#4 Ignore delimiters?

closed
nobody
None
5
2006-02-08
2006-02-08
Tim Cera
No

I have just started looking at pyparsing and it is such
a powerful tool that it may be able to do this, but I
couldn't find it.

Many of the data files that I work with are something
like...

12/01/2001 12:00:00 4.51
12/01/2001 12:06:00 4.65
12/01/2001 12:12:00 4.72
...

I want to be able to tell pyparsing to look for in
order 6 integers and 1 float. Basically to ignore
everything else (white space, delimiters, text...).

I hacked something together that would do this for me,
and then found pyparsing.

Eventually what I want is a companion file to the input
data set (say with the same basename but a different
extension), that would specify how the program should
read the file.

Discussion

  • Tim Cera
    Tim Cera
    2006-02-08

    • status: open --> closed
     
  • Tim Cera
    Tim Cera
    2006-02-08

    Logged In: YES
    user_id=169213

    Nevermind. :-)

    It looks like SkipTo does exactly what I want.

    Thanks for pyparsing!