Paul McGuire wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hello, >> >> I cannot figure out a way to find a regular expression that would >>match one and only one of these two strings: [clip] >>Any suggestion ? Thanks a bunch ! >>Mathieu >> > > A pyparsing approach is not as terse as regexp's, but it's not terribly long > either.
To second Paul's suggestion, usually, if the regex is not immediately obvious, its probably better to look into parsing modules, pyparsing being one of the most accessible modules (to me, anyways)--and well worth learning. However, in complicated applications, regex is usually still fun and valuable as an intellectual exercise. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list