Skip to content

Fix File::GlobMapper wildcard replacement after ordinary letters#76

Merged
pmqs merged 1 commit into
pmqs:masterfrom
vlmarek:master
Jun 13, 2026
Merged

Fix File::GlobMapper wildcard replacement after ordinary letters#76
pmqs merged 1 commit into
pmqs:masterfrom
vlmarek:master

Conversation

@vlmarek

@vlmarek vlmarek commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

The eval-removal change used a single-quoted negative lookbehind containing ${BEGIN_DELIM}. That made the regex treat the characters in the literal string "${BEGIN_DELIM}" as excluded preceding characters, so output patterns such as B#1.out or IMG#1.out did not expand #1.

Escaped literal # and * are already protected with HASH_ESC and STAR_ESC before wildcard references are converted to internal markers, so the lookbehind is not needed. Replace exact internal marker sequences directly when generating output filenames.

Add a regression test for expanding #1 after an ordinary letter.

The eval-removal change used a single-quoted negative lookbehind
containing ${BEGIN_DELIM}. That made the regex treat the characters in the
literal string "${BEGIN_DELIM}" as excluded preceding characters, so output
patterns such as B#1.out or IMG#1.out did not expand pmqs#1.

Escaped literal # and * are already protected with HASH_ESC and STAR_ESC
before wildcard references are converted to internal markers, so the
lookbehind is not needed. Replace exact internal marker sequences directly
when generating output filenames.

Add a regression test for expanding pmqs#1 after an ordinary letter.
@pmqs pmqs self-assigned this Jun 11, 2026
@pmqs

pmqs commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Thanks @vlmarek

the change looks fine, but I'll need to remind myself about that area of code. Will be a few days as my dev box is not working properly.

Extra bonus points for creating a test for the fix!

thanks
Paul

@pmqs pmqs merged commit 3651e9e into pmqs:master Jun 13, 2026
64 of 65 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.

2 participants