Loïc Berthe
2014-01-30 21:56:25 UTC
Hi,
I would like to define a parser to detect strings containing repeated terms :
- it should match 'A123A', 'B123B'
- but not 'A123B'
With python re module, I would define a parser like this :
parser = re.compile(r'(\w+)(\d+)\1')
Is there a pyparsing equivalent to re \1 and \2 patterns in pyparsing ?
I would like to define a parser to detect strings containing repeated terms :
- it should match 'A123A', 'B123B'
- but not 'A123B'
With python re module, I would define a parser like this :
parser = re.compile(r'(\w+)(\d+)\1')
Is there a pyparsing equivalent to re \1 and \2 patterns in pyparsing ?
--
Loïc
Loïc