py/gadict_headwords.py
changeset 757 5417f2102dc5
parent 720 b5a4b476eddf
--- a/py/gadict_headwords.py	Tue Feb 21 10:03:54 2017 +0200
+++ b/py/gadict_headwords.py	Tue Feb 21 10:10:03 2017 +0200
@@ -2,7 +2,7 @@
 import sys
 import codecs
 import io
-import regex
+import re
 
 FINAME = None
 FONAME = None
@@ -20,10 +20,10 @@
 
 class GadictParser:
 
-    SEPARATOR_RE = regex.compile(u"^__$")
-    EMPTY_RE = regex.compile( u"^$" )
-    HEADWORD_ATTR_RE = regex.compile( u"^ " )
-    HEADWORD_RE = regex.compile( u"^(\\p{L}.*)$" )
+    SEPARATOR_RE = re.compile(u"^__$", re.UNICODE)
+    EMPTY_RE = re.compile( u"^$" )
+    HEADWORD_ATTR_RE = re.compile( u"^ " )
+    HEADWORD_RE = re.compile(u"^(\\w.*)$", re.UNICODE)
 
     def __init__(self, stream):
         self.stream = stream