Parsing Text Usng Combine Is Not Returning Any Results
I am new to pyparsing. I am attempting to parse some text but don't really understand how pyparsing is behaving. from pyparsing import * number = Word(nums) yearRange = Combine(nu
Solution 1:
I figured out the behavior occurs because of the way Combine()
works. It expects that there will not be any white space between tokens but can be overridden.
According to the documentation:
Combine - joins all matched tokens into a single string, using specified joinString (default joinString=""); expects all matching tokens to be adjacent, with no intervening whitespace (can be overridden by specifying adjacent=False in constructor)
Post a Comment for "Parsing Text Usng Combine Is Not Returning Any Results"