[BangPypers] Parse multi line with re module.

Gora Mohanty gora at mimirtech.com
Tue Jan 3 17:19:26 CET 2012


On Tue, Jan 3, 2012 at 9:36 PM, Pratap Chakravarthy <prataprc at gmail.com> wrote:
>> *Really?* I believe that the ball is currently in your court.
>> It was *your* regex that was broken, and badly, if I may
>> add.
>
> By saying broken, do you mean that this regex
>   r'Searching for OPUSH on([^\.\n\r]+)|Channel:([^\r\n]*)'
> follows the pathological case of exponential complexity ?
[...]

No, it doesn't: The exponential complexity was a general
crib, based on your statement.

Again, please do not take it personally, but the above is
just *broken* and does not even try, IMHO. For someone
who claims to be an advocate for regexs, this is "not even
wong": http://en.wikipedia.org/wiki/Not_even_wrong

A MAC address is pretty well-specified, but you do not
even try, when at least the OP did. Again, forgive me,
but this smells of intellectual laziness to me.

Regards,
Gora


More information about the BangPypers mailing list