S
shahargs
Hi,
I'm trying to write application which parse one page to sentences and
then, check every group for few things.
The code:
rawstr = r"""([^.?!]+[.?!])"""
regex=re.compile(rawstr)
matchs=regex.search(document)
document, is the text i parsing. I cheked it in Kodos, and everything
worked well. but, i'm trying to write for loop which check every
group.
I tried:
for group in matchs.groups():
but then, it's check only the first group. and i tried:
for group in matchs.group():
but then it's checking every letter, not every sentence.
is anyone know how i should write this loop to check every group on
the groups collection that the regular expression return?
Shahar.
I'm trying to write application which parse one page to sentences and
then, check every group for few things.
The code:
rawstr = r"""([^.?!]+[.?!])"""
regex=re.compile(rawstr)
matchs=regex.search(document)
document, is the text i parsing. I cheked it in Kodos, and everything
worked well. but, i'm trying to write for loop which check every
group.
I tried:
for group in matchs.groups():
but then, it's check only the first group. and i tried:
for group in matchs.group():
but then it's checking every letter, not every sentence.
is anyone know how i should write this loop to check every group on
the groups collection that the regular expression return?
Shahar.