diff options
| -rw-r--r-- | sec_certs/model/cpe_matching.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sec_certs/model/cpe_matching.py b/sec_certs/model/cpe_matching.py index b8c28bcf..ac96d1de 100644 --- a/sec_certs/model/cpe_matching.py +++ b/sec_certs/model/cpe_matching.py @@ -131,8 +131,7 @@ class CPEClassifier(BaseEstimator): @staticmethod def _replace_special_chars_with_space(string: str) -> str: - replace_non_letter_non_numbers_with_space = re.compile(r"(?ui)\W") - return replace_non_letter_non_numbers_with_space.sub(' ', string) + return re.sub(r'[^a-zA-Z0-9 \n\.]', ' ', string) @staticmethod def _discard_trademark_symbols(string: str) -> str: |
