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 output

  saw hello
  saw mello

Is it possible to do the same in Python with any modules that come
with the standard distribution, or with any other modules?

Thanks in advance for any help,

Avi Kak ([EMAIL PROTECTED])

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to