Skip to content

Transpose parts of filenames using RegEx groups not working in PowerRename #45385

@ChrisRaye

Description

@ChrisRaye

Microsoft PowerToys version

0.97.0

Installation method

PowerToys auto-update

Area(s) with issue?

PowerRename

Steps to reproduce

Using this RegEx: ^\d{4}-(\d\d-\d\d)_(.+)$
and this rename: $2_$1
on this filename: 2025-01-22_Accrued_Benefit.pdf
using Apply to: Filename only
results in only the match from $2, i.e. Accrued_Benefit

Image

✔️ Expected Behavior

Filename of Accrued_Benefit_01-22.pdf

❌ Actual Behavior

Filename of Accrued_Benefit.pdf

Additional Information

OS Version: Windows 11
Not using Boost library for RegEx

Other Software

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugSomething isn't workingNeeds-TriageFor issues raised to be triaged and prioritized by internal Microsoft teamsProduct-PowerRenameRefers to the PowerRename PowerToy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions