I only want to remove the comments which begin with "//".
I did like this, but it doesn't work.
r=re.compile(ur "//[^\r\n]+$", re.UNICODE|re.V ERBOSE)
f=file.open("my cpp.cpp","r")
f=unicode(f,"ut f8")
r.sub(ur"",f)
Will somebody show me the right way?
Thanks~~
I did like this, but it doesn't work.
r=re.compile(ur "//[^\r\n]+$", re.UNICODE|re.V ERBOSE)
f=file.open("my cpp.cpp","r")
f=unicode(f,"ut f8")
r.sub(ur"",f)
Will somebody show me the right way?
Thanks~~
Comment