Hi,
concerning to unicode, "\n", "\r "and "\r\n" (0x000A, 0x000D and
0x000D+0x000A) should be threatened as newline character
at least this is how i understand it:
(http://en.wikipedia.org/wiki/Newline#Unicode)
obviously, the re module does not care, and on unix, only threatens \n
as newline char:
<_sre.SRE_Mat ch object at 0xb5908fa8>
same thing for $:
<_sre.SRE_Mat ch object at 0xb5908f70>
<_sre.SRE_Mat ch object at 0xb5908fa8>
is this a known bug in the re module? i couldn't find any issues in the
bug tracker.
Or is this just a user fault and you guys can help me?
arian
p.s.: appears in both python2.4 and 2.5
concerning to unicode, "\n", "\r "and "\r\n" (0x000A, 0x000D and
0x000D+0x000A) should be threatened as newline character
at least this is how i understand it:
(http://en.wikipedia.org/wiki/Newline#Unicode)
obviously, the re module does not care, and on unix, only threatens \n
as newline char:
>>a=re.compile( u"^a",re.U|re.M )
>>a.search(u"bc \ra")
>>a.search(u"bc \na")
>>a.search(u"bc \ra")
>>a.search(u"bc \na")
same thing for $:
>>b = re.compile(u"c$ ",re.U|re.M )
>>b.search(u"bc \r\n")
>>b.search(u"ab c")
>>b.search(u"bc \r\n")
>>b.search(u"ab c")
>>b.search(u"bc \nde")
is this a known bug in the re module? i couldn't find any issues in the
bug tracker.
Or is this just a user fault and you guys can help me?
arian
p.s.: appears in both python2.4 and 2.5