re question
Aahz Maruch
aahz at netcom.com
Sat Oct 16 23:39:02 EDT 1999
In article <c75g0za3g94.fsf at pc142.cosc.canterbury.ac.nz>,
Tim Evans <tre17 at student.canterbury.ac.nz> wrote:
>
>To match everything between two occurances of %%%, including embedded
>%, this expression will work:
>
>get = re.compile(r'%%%(.*?)%%%')
>
>The important part is the *?, which matches the smallest possible
>string rather than the largest.
This fails on '%'*7.
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
More information about the Python-list
mailing list