[issue23532] regex "|" behavior differs from documentation

2015-02-26 Thread Rick Otten
Rick Otten added the comment: Can the documentation be updated to make this more clear? I see now where the clause "As the target string is scanned, ..." is describing what you have listed here. I and a coworker both read the description several times and missed that. I though

[issue23532] regex "|" behavior differs from documentation

2015-02-26 Thread Rick Otten
New submission from Rick Otten: The documentation states that "|" parsing goes from left to right. This doesn't seem to be true when spaces are involved. (or \s). Example: In [40]: mystring Out[40]: 'rwo incorporated' In [41]: re.sub('incorporated

[issue23532] regex "|" behavior differs from documentation

2015-02-26 Thread Rick Otten
Changes by Rick Otten : -- components: Regular Expressions nosy: Rick Otten, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: regex "|" behavior differs from documentation type: behavior versions: Python 2.7