Matthew Barnett added the comment:

A slightly shorter form:

    /\*(?:(?!\*/).)*\*/

Basically it's:

    match start

    while not match end:
        consume character

    match end

If the "match end" is a single character, you can use a negated character set, 
for example:

    [^\n]*

otherwise you need a negative lookahead, for example:

    (?:(?!\r\n).)*

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29977>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to