Puali, I was wondering why the there seemed to be two uses for parens in the string. I now have the braces in. The issue now I suspect is the stuff after (?P<version>. That is where I am really confused.
Any opinions there. --Lew On Mar 24, 2009, at 3:32 PM, Pauli Virtanen wrote: > Tue, 24 Mar 2009 15:11:05 -0400, Lewis E. Randerson wrote: > >> Hi, >> >> I am trying to setup a new compiler for numpy and my lack of python >> pattern matching syntax knowledge is bogging me down. >> >> Here is one of my non-working patterns. >> ================================================= >> version_pattern = r'Pathscale(TM) Compiler Suite: Version (? >> P<version>[^\s]*)' >> ================================================= > > Possibly like so: > > version_pattern = r'PathScale\(TM\) Compiler Suite: Version (? > P<version>[^\s]*)' > > You need the escapes to avoid the first braces to be interpreted as > a group. > > -- > Pauli Virtanen > > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion ---------------------------------------------------------------------- Lewis E. Randerson DOE Princeton University Plasma Physics Laboratory, Princeton University, James Forrestal Campus 100 Stellarator Road, Princeton, NJ 08543 Work: 609/243-3134, Fax: 609/243-3086, PPPL Web: http://www.pppl.gov _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion