Re: [Tutor] pyparsing complex search

2009-07-16 Thread Paul McGuire
> Hi Paul. Thanks. I would like to get better at pyparsing. Can you > recommend a good resource for learning. I am finding that what info I > have found on the subject (on the web) isn't really explaining it from > the ground up as much as I would like. Hrmmm, not sure what to recommend - I might

Re: [Tutor] pyparsing complex search

2009-07-16 Thread pedro
Hi Paul. Thanks. I would like to get better at pyparsing. Can you recommend a good resource for learning. I am finding that what info I have found on the subject (on the web) isn't really explaining it from the ground up as much as I would like. Cheers Pete ___

Re: [Tutor] pyparsing complex search

2009-07-16 Thread Paul McGuire
Pedro - If you are trying to extract a simple pattern like a numeric word followed by an alpha word, I would suggest using one of the scanString or searchString methods. scanString is probably the better choice, since you seem to need not only the matching tokens, but also the location within the

[Tutor] pyparsing complex search

2009-07-16 Thread pedro
Hi, well mabe it's not so complex (just for me). I have this code which works fine: #start### from pyparsing import * data = """23 different size pry bars hammer the pitchfork pound felt paper staple the felt paper every to inches staple ham