Re: embedding executable code in a regular expression in Python

2006-07-18 Thread Anthra Norell
Hi, see below ... - Original Message - From: "Paul McGuire" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Monday, July 17, 2006 10:09 AM Subject: Re: embedding executable code in a regular expression in Python > Avi Kak wrote: > > Folks, > &

Re: embedding executable code in a regular expression in Python

2006-07-17 Thread Paul McGuire
Avi Kak wrote: > Folks, > > Does regular expression processing in Python allow for executable > code to be embedded inside a regular expression? > > For example, in Perl the following two statements > > $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw > mello\n"})/; > "jellohellomello"

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Stefan Behnel
Avi Kak wrote: > Does regular expression processing in Python allow for executable > code to be embedded inside a regular expression? > > For example, in Perl the following two statements > > $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw > mello\n"})/; > "jellohellomello" =~ /$reg

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Ben C
On 2006-07-16, Avi Kak <[EMAIL PROTECTED]> wrote: > Folks, > > Does regular expression processing in Python allow for executable > code to be embedded inside a regular expression? > > For example, in Perl the following two statements > > $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw >

Re: embedding executable code in a regular expression in Python

2006-07-16 Thread Anthra Norell
- Original Message - From: "Avi Kak" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Sunday, July 16, 2006 11:05 PM Subject: embedding executable code in a regular expression in Python > Folks, > > Does regular expression processing in Python allow

embedding executable code in a regular expression in Python

2006-07-16 Thread Avi Kak
Folks, Does regular expression processing in Python allow for executable code to be embedded inside a regular expression? For example, in Perl the following two statements $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw mello\n"})/; "jellohellomello" =~ /$regex/; will produce the