diff --git a/neo/io/klustakwikio.py b/neo/io/klustakwikio.py index ab8dd69ae..a580c4736 100644 --- a/neo/io/klustakwikio.py +++ b/neo/io/klustakwikio.py @@ -13,6 +13,7 @@ * Load features in addition to spiketimes. """ +import re import glob import logging from pathlib import Path @@ -439,7 +440,7 @@ def read_filenames(self, typestring='fet'): for v in all_filenames: # Test whether matches format, ie ends with digits split_fn = v.name - m = glob.re.search((r'^(\w+)\.%s\.(\d+)$' % typestring), split_fn) + m = re.search(rf'^(.*)\.{typestring}\.(\d+)$', split_fn) if m is not None: # get basename from first hit if not specified if self.basename is None: