Skip to content

Commit

Permalink
Merge pull request #1319 from ximion/wip/klustakwik_fix
Browse files Browse the repository at this point in the history
klustakwikio: Adjust regular expression to catch more filenames
  • Loading branch information
apdavison authored Oct 10, 2023
2 parents 443bbb7 + 7cb9788 commit 25d0f1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/io/klustakwikio.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Load features in addition to spiketimes.
"""

import re
import glob
import logging
from pathlib import Path
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 25d0f1d

Please sign in to comment.