diff --git a/tabellio/searchform/cmpfunctions.py b/tabellio/searchform/cmpfunctions.py index b8b0e47..fe522b2 100644 --- a/tabellio/searchform/cmpfunctions.py +++ b/tabellio/searchform/cmpfunctions.py @@ -1,3 +1,4 @@ +import re import Missing from tabellio.documents.typenames import MAPPING from plone.i18n.normalizer.fr import normalizer @@ -5,6 +6,11 @@ import tabellio.config.utils def get_no_as_int(i): if i: + if ' ' in i: + try: + return int(re.match('\d+', i).group() + except ValueError: + return 99999 try: return int(i.split('-')[0]) except ValueError: