* Fredrik Lundh wrote:
> Sergey Schetinin wrote:
>
>> it's line #159 here, but it did work! thanks. so it IS a bug?
>
> sure looks like one. please report it here:
>
> http://sourceforge.net/tracker/?group_id=5470&atid=105470
done :)
nd
--
"Das Verhalten von Gates hatte mir bewiesen, da
* Fredrik Lundh wrote:
> André Malo wrote:
>
>> No, I suppose they shouldn't compile.
>> _re_pair should be (?P=plus).
>
> the (?(NAME)RE|RE) form was added in 2.4.
>
> looks like a bug to me; the "plus" group is set to "+" in all four cases,
> so the
> final pattern should match. but I might
* lothar wrote:
As already said by Georg, regexes are the wrong tool for such tasks, but
anyway...
> give an re to find every innermost "table" element:
]*)?>[^<]*(?:<(?!/table>|table(?:\s[^>]*)?>)[^<]*)*
> give an re to find every "pre" element directly followed by an "a"
> element:
]*)?>[^<]
* lothar wrote:
> a non-greedy match - as implicitly defined in the documentation - is a
> match in which there is no proper substring in the return which could also
> match the regex.
Your argumentation is starting at the wrong place. The documentation doesn't
define the bahviour, it tries to de
* Sergey Schetinin wrote:
> Here's the session log:
>
_re_pair="(?(plus).|-)"
_re1=("(?P\+)"+_re_pair)
_re2=("((?P\+))"+_re_pair)
_re3=("(?:(?P\+))"+_re_pair)
_re4="(%s)"%_re3
import re
print [re.match(_re, "+a") and 'match' for _re in [_re1, _re2,
> _re3, _re4]
s still start
matching the leftmost. So instead the longest of the leftmost you get the
shortest of the leftmost. One may consider this as a documentation bug,
yes.
nd
--
# Andrà Malo, <http://www.perlig.de/> #
--
http://mail.python.org/mailman/listinfo/python-list
ncapsulate the os.path.isfile call in an own method, which can be
overridden by your test.
nd
--
# Andrà Malo, <http://pub.perlig.de/> #
--
http://mail.python.org/mailman/listinfo/python-list