Paul McGuire wrote:
> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Dont use regex as a name. Also, do you have any script called "re.py"
> > hidding that library module? or regex.py?
>
> My bet is that a local re.py is masking the lib module. (It's a shame
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dont use regex as a name. Also, do you have any script called "re.py"
> hidding that library module? or regex.py?
My bet is that a local re.py is masking the lib module. (It's a shame this
error is so easy to tri
At Wednesday 8/11/2006 15:01, Brian wrote:
I have a very small script:
import re
text = open('eq.txt','r').read()
regex = '[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]'
pattern = re.compile(regex)
match = pattern.findall(text)
print ''.join(match)
-
I have a very small script:
import re
text = open('eq.txt','r').read()
regex = '[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]'
pattern = re.compile(regex)
match = pattern.findall(text)
print ''.join(match)
However, when I try to run it, I get this error:
Traceback (most recent call last):
File
"/Appli