[BangPypers] Regular Expressions

Kenneth Gonsalves lawgon at gmail.com
Thu Mar 17 00:25:26 CET 2011


On Wed, 2011-03-16 at 23:27 +0530, Santhosh Edukulla wrote:
> 1.
> When i read the regular expression above from the file to a variable
> *(EX:
> a)*. as below
> EX:
> *a=open('inp.txt','r').readlines()[0]*
> 
> Iam getting a different regular expresson as  *'(/|\\\\)cmd\.com$'*
> 
> 2. Instead when i use *a.encode('string-escape')*, iam getting the
> output
> for a as * '(/|\)cmd\.com$' *So when used like this, re.compile()
> statement
> gives an error 

are the '*' characters in your mail part of the re? If not please
reformat your mail without the '*' characters
-- 
regards
Kenneth Gonsalves
http://lawgon.livejournal.com/



More information about the BangPypers mailing list