[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-20 Thread Jason Stumpf
Jason Stumpf added the comment: I like that clearer description. "as produce matches" is more correct than "as possible". -- ___ Python tracker <http://bug

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-19 Thread Jason Stumpf
Jason Stumpf added the comment: I understand what's happening, but that is not what the documentation describes. If the behaviour is correct, the documentation is incorrect. -- ___ Python tracker <http://bugs.python.org/is

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-19 Thread Jason Stumpf
Jason Stumpf added the comment: Sorry, that implication was backwards. I don't think I can prove from just the documentation that '(a|ab)*' can match 'aba' in certain contexts. If the docs said: "* attempts to match again after each match of the preceding r

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-19 Thread Jason Stumpf
Jason Stumpf added the comment: Even with the documentation to |, the documentation to * is wrong. >>> re.match('(a|ab)*c',('abac')).group(0) 'abac' >From the doc: In general, if a string p matches A and another string q matches >B, the string pq w

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-19 Thread Jason Stumpf
Changes by Jason Stumpf : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett ___ Python tracker <http://bugs.python.org/issue19055> ___ ___ Pytho

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-19 Thread Jason Stumpf
New submission from Jason Stumpf: >>> re.match('(a|ab)*',('aba')).group(0) 'a' According to the documentation, the * should match as many repetitions as possible. 2 are possible, it matches 1. Reversing the order of the operands of | changes the b