[issue23532] add example of 'first match wins' to regex "|" documentation?

June 4, 2017
11:57 a.m.
Serhiy Storchaka added the comment:
From the documentation:
""" As the target string is scanned, REs separated by ``'|'`` are tried from left to right. When one pattern completely matches, that branch is accepted. This means that once ``A`` matches, ``B`` will not be tested further, even if it would produce a longer overall match. In other words, the ``'|'`` operator is never greedy. """ I think this completely describes the behavior. ---------- nosy: +serhiy.storchaka resolution: -> not a bug status: open -> pending _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23532> _______________________________________
2823
Age (days ago)
2823
Last active (days ago)
0 comments
1 participants
participants (1)
-
Serhiy Storchaka