Re: [Tutor] question regarding regular expression compile

2011-01-13 Thread Steven D'Aprano
Luke Paireepinart wrote: No. Did you try that? It doesn't evn look like valid python code to me. You want a single string with the r before it, not 3 separate strings. The line of code in question is: test = re.compile('MAT file (billing|carrier|log|util)' r'\\' '\d{8} deleted') If

Re: [Tutor] question regarding regular expression compile

2011-01-12 Thread Luke Paireepinart
No. Did you try that? It doesn't evn look like valid python code to me. You want a single string with the r before it, not 3 separate strings. - Sent from a mobile device. Apologies for brevity and top-posting. - On Jan 12, 2011, at 8:02 AM,

Re: [Tutor] question regarding regular expression compile

2011-01-12 Thread Yaniga, Frank
I believe I had epiphany: test = re.compile('MAT file (billing|carrier|log|util)' r'\\' '\d{8} deleted') is this correct? _ From: Yaniga, Frank Sent: Wednesday, January 12, 2011 8:20 AM To: 'tutor@python.org'; 'h...@python.org' Subject: questi

Re: [Tutor] question regarding regular expression compile

2011-01-12 Thread Evert Rol
> I am determining a regular expression that can recognize the any of the > following strings: > > MAT file log\20101225 deleted > MAT file billing\20101225 deleted > MAT file util\20101225 deleted > MAT file carrier\20101225 deleted > > I begin by creating a regular expression object so that

Re: [Tutor] question regarding regular expression compile

2011-01-12 Thread Adam Bark
On 12/01/11 13:19, Yaniga, Frank wrote: I am determining a regular expression that can recognize the any of the following strings: MAT file log\20101225 deleted MAT file billing\20101225 deleted MAT file util\20101225 deleted MAT file carrier\20101225 deleted I begin by creating a regular expres