Re: Regex with ASCII and non-ASCII chars
- From: "TOXiC" <GatlingGun@xxxxxxxxx>
- Date: 31 Jan 2007 07:32:27 -0800
Thx it work perfectly.
If I want to query a file stream?
file = open(fileName, "r")
text = file.read()
file.close()
regex = re.compile(u"(ÿÿ‹ð…öÂ)", re.IGNORECASE)
match = regex.search(text)
if (match):
result = match.group()
print result
WritePatch(fileName,text,result)
else:
result = "No match found"
print result
It return "no match found" (the file contain the string "ÿÿ‹ð…öÂ"
but...).
Thanks in advance for the help!
.
- Follow-Ups:
- Re: Regex with ASCII and non-ASCII chars
- From: Peter Otten
- Re: Regex with ASCII and non-ASCII chars
- References:
- Regex with ASCII and non-ASCII chars
- From: TOXiC
- Re: Regex with ASCII and non-ASCII chars
- From: Peter Otten
- Regex with ASCII and non-ASCII chars
- Prev by Date: Re: Help needed on config files
- Next by Date: Re: Conditional expressions - PEP 308
- Previous by thread: Re: Regex with ASCII and non-ASCII chars
- Next by thread: Re: Regex with ASCII and non-ASCII chars
- Index(es):