Skip to content

Commit 25d0f1d

Browse files
authored
Merge pull request #1319 from ximion/wip/klustakwik_fix
klustakwikio: Adjust regular expression to catch more filenames
2 parents 443bbb7 + 7cb9788 commit 25d0f1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo/io/klustakwikio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Load features in addition to spiketimes.
1414
"""
1515

16+
import re
1617
import glob
1718
import logging
1819
from pathlib import Path
@@ -439,7 +440,7 @@ def read_filenames(self, typestring='fet'):
439440
for v in all_filenames:
440441
# Test whether matches format, ie ends with digits
441442
split_fn = v.name
442-
m = glob.re.search((r'^(\w+)\.%s\.(\d+)$' % typestring), split_fn)
443+
m = re.search(rf'^(.*)\.{typestring}\.(\d+)$', split_fn)
443444
if m is not None:
444445
# get basename from first hit if not specified
445446
if self.basename is None:

0 commit comments

Comments
 (0)