Skip to content

Regexp takes only last character of first group #3

Open
@krisavi

Description

@krisavi

According to regex it seems to take only last character of the first group instead of full part.

"build-rename-logo": "renamer --regex --find '([^\\.])\\.[^\\.]+\\.(\\w+)' --replace '$1.$2' build/static/media/*",

to fix it the first group should be like: ([^\\.]+)

Update: tested it with incorrect format and it seemed to even work correctly, even though according to regex it should only take last character, i.e. logo.f0e512c7.svg to o.svg

regexr.com/42sol

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