Skip to content

Specify which matches to replace #35

@graphixillusion

Description

@graphixillusion

Hi there. I was playing around with this and i can't find a way to select just the desidered matches only. Let me make some examples about this:

  1. Filename01_description_01

I would like to replace just the first "_" with something else, for example " - " so it will be renamed to

Filename01 - description_01

  1. Filename_02_description_02

I would like to replace just the first two "_" with " - " so it will be renamed to:

Filename - 02 - description_02 and so on.

With regex if you want to match just the first "_" you just remove the /g from the expression but this doesn't work in brename

this command:

brename -p "_" -r " - "

replace all the founds "_" into " - "

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions