Skip to content

fix: handle non-alphanumeric characters in infer_pattern (#102)#103

Merged
sameeul merged 1 commit intoPolusAI:masterfrom
sameeul:fix/issue-102-special-chars-in-infer-pattern
Mar 12, 2026
Merged

fix: handle non-alphanumeric characters in infer_pattern (#102)#103
sameeul merged 1 commit intoPolusAI:masterfrom
sameeul:fix/issue-102-special-chars-in-infer-pattern

Conversation

@sameeul
Copy link
Member

@sameeul sameeul commented Mar 12, 2026

Fixed RuntimeError when inferring patterns from files with special characters (periods, hyphens, underscores) in their names, particularly affecting files with .ome.tif extensions.

The pattern inference algorithm now properly checks if non-alphanumeric characters match before throwing an error, allowing them to be included in the inferred pattern.

Changes:

  • Modified swSearch traceback logic in pattern.cpp to handle matching special characters
  • Added comprehensive regression tests in test_inferpattern_special_chars.py

Fixes #102

Fixed RuntimeError when inferring patterns from files with special
characters (periods, hyphens, underscores) in their names, particularly
affecting files with .ome.tif extensions.

The pattern inference algorithm now properly checks if non-alphanumeric
characters match before throwing an error, allowing them to be included
in the inferred pattern.

Changes:
- Modified swSearch traceback logic in pattern.cpp to handle matching
  special characters
- Added comprehensive regression tests in test_inferpattern_special_chars.py

Fixes PolusAI#102

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sameeul sameeul merged commit 55add89 into PolusAI:master Mar 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError in filepattern.infer_pattern with non-alphanumeric characters in file names

1 participant