kopia lustrzana https://github.com/micropython/micropython-lib
re-pcre: Match: add start()/end() methods.
rodzic
9592480266
commit
9fcd9e7b3c
|
@ -38,6 +38,12 @@ class PCREMatch:
|
|||
def group(self, n):
|
||||
return self.s[self.offsets[n*2]:self.offsets[n*2+1]]
|
||||
|
||||
def start(self, n=0):
|
||||
return self.offsets[n*2]
|
||||
|
||||
def end(self, n=0):
|
||||
return self.offsets[n*2+1]
|
||||
|
||||
def span(self, n=0):
|
||||
return self.offsets[n*2], self.offsets[n*2+1]
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue