ure.match("[abcd][01][01]","d00ba11c01d10")
When I use ure on "MicroPython v1.14 on 2021-04-11; Raspberry Pi Pico with RP2040" that expression only returns one match (the first one). How do I get to the other matches? Thanks!!!
Code: Select all
>>> import ure
>>> r=ure.match("[abcd][01][01]","d00ba11c01d10")
>>> r
<match num=1>
>>> dir(r)
['__class__', 'end', 'start', 'group', 'groups', 'span']
>>> r.group(0)
'd00'
>>> r.group(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: 1
>>> r.span(0)
(0, 3)
>>> r.span(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: 1