]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/special_phrases.py
Fix occurence regex
[nominatim.git] / nominatim / tools / special_phrases.py
index 3bb240ab88d9b0e90c36c714de89112395f2742b..d172498a13fdc6fb7268e7c71a02d2ce0989e2a5 100644 (file)
@@ -27,7 +27,7 @@ class SpecialPhrasesImporter():
         self.black_list, self.white_list = self._load_white_and_black_lists()
         #Compile the regex here to increase performances.
         self.occurence_pattern = re.compile(
-            r'\| ([^\|]+) \|\| ([^\|]+) \|\| ([^\|]+) \|\| ([^\|]+) \|\| ([\-YN])'
+            r'\| *([^\|]+) *\|\| *([^\|]+) *\|\| *([^\|]+) *\|\| *([^\|]+) *\|\| *([\-YN])'
         )
         self.sanity_check_pattern = re.compile(r'^\w+$')
         self.transliterator = Transliterator.createFromRules("special-phrases normalizer",