jamadden / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 2 forks source link

is \x1e in \s? #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Thanks for your works

Here is the code
-----------------------------------
import re#gex as re

t1 = '\x1e'
r1 = r'(\s)'

p = re.compile(r1)
m = p.search(t1)
if m != None:
    print('m.groups()\n', m.groups())
-----------------------------------
if import re:
    \x1e in \s
if import regex:
    \x1e not in \s

Which version of Python? 32-bit or 64-bit?
3.4.1rc1 32-bit

Which operating system? Big-endian or little-endian?
Windows 7 SP1

Original issue reported on code.google.com by animaliz...@gmail.com on 17 May 2014 at 10:55

GoogleCodeExporter commented 9 years ago
That's interesting...

According to the Unicode standard (well, Unicode 6.3 at least), \s is the same 
as \p{Whitespace}, which includes the codepoints \x09..\x0D, but excludes 
\x1C..\x1E.

As I'm trying to follow the Unicode standard, I think I'll leave it as-is.

Original comment by re...@mrabarnett.plus.com on 17 May 2014 at 4:33