On 9 Mai, 11:00, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> I often have the need to match multiple regexes against a single
> string, typically a line of input, like this:
>
> if (matchobj = re1.match(line)):
> ... re1 matched; do something with matchobj ...
> elif (matchobj = re2.match(line)):
On May 9, 5:00 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> I often have the need to match multiple regexes against a single
> string, typically a line of input, like this:
>
> if (matchobj = re1.match(line)):
> ... re1 matched; do something with matchobj ...
> elif (matchobj = re2.match(line))
Hrvoje Niksic wrote:
> I often have the need to match multiple regexes against a single
> string, typically a line of input, like this:
>
> if (matchobj = re1.match(line)):
> ... re1 matched; do something with matchobj ...
> elif (matchobj = re2.match(line)):
> ... re2 matched; do something wi
I often have the need to match multiple regexes against a single
string, typically a line of input, like this:
if (matchobj = re1.match(line)):
... re1 matched; do something with matchobj ...
elif (matchobj = re2.match(line)):
... re2 matched; do something with matchobj ...
elif (matchobj = re