On Aug 3, 11:44 am, Robert Kern wrote:
> On 2009-08-03 12:29, MRAB wrote:
>
>
>
>
>
> > Robert Kern wrote:
> > [snip]
>
> >> for line in readThis:
> >> key_match = key.search(line)
> >> if key_match is not None:
> >> this_key = key_match.group(1)
> >> # ... do something with this_key
> >> map_matc
On 2009-08-03 12:29, MRAB wrote:
Robert Kern wrote:
[snip]
for line in readThis:
key_match = key.search(line)
if key_match is not None:
this_key = key_match.group(1)
# ... do something with this_key
map_match = map.search(line)
if map_match is not None:
this_map = map_match.group(1)
# ... do so
Robert Kern wrote:
[snip]
for line in readThis:
key_match = key.search(line)
if key_match is not None:
this_key = key_match.group(1)
# ... do something with this_key
map_match = map.search(line)
if map_match is not None:
this_map = map_match.group(1)
On 2009-08-01 14:39, Michael Savarese wrote:
I'm a python newbie and I'm trying to test several regular expressions
on the same line before moving on to next line.
it seems to move on to next line before trying all regular expressions
which is my goal.
it only returns true for first regular expr
Michael Savarese wrote:
I'm a python newbie and I'm trying to test several regular expressions on
the same line before moving on to next line.
it seems to move on to next line before trying all regular expressions which
is my goal.
it only returns true for first regular expression
does the curser
Michael Savarese:
>
> for line in readThis:
> try:
> thisKey = key.search(line).group(1)
> thisMap = map.search(line).group(1)
> thisParcel = parcel.search(line).group(1)
> except:
> continue
Why do you catch all exceptions in that loop? Remove the try-exce
I'm a python newbie and I'm trying to test several regular expressions on
the same line before moving on to next line.
it seems to move on to next line before trying all regular expressions which
is my goal.
it only returns true for first regular expression
does the curser have to be rest to beginn