8000 Can't get --match to work · Issue #901 · tdewolff/minify · GitHub
[go: up one dir, main page]

Skip to content

Can't get --match to work #901

Closed
Closed

Description

@movedoa

I have no idea what i am doing wrong here, i'm trying to use the --match option to recursively minify all js files in a directory with the cli on windows.

C:\Temp\minify.exe --recursive --inplace --match "*.js" --exclude "**/PdfJs/**" "**/jquery/**" "**/SignalR/**" -- "C:\Temp\Output"

but i always get this error:

ERROR: error parsing regexp: missing closing ]: [^]*.js'$``

Is this a bug or am i doing something wrong here?
Even the example from the cli docs ("--match '*.css'") doesn't work

Activity

  1. tdewolff commented on Jan 29, 2026

    @tdewolff
    Owner

    Thanks, this was not working for Windows.

  2. added a commit that references this issue on Jan 29, 2026
    66bad8b
  3. movedoa commented on Jan 29, 2026

    @movedoa
    Author

    Thx for the quick fix, just a quick question since the docs don't mention this.
    Is --match case sensitive? If so, is there a way to match case insensitive?

  4. tdewolff commented on Jan 29, 2026

    @tdewolff
    Owner

    Something is mentioned in the docs, but I've improved it and added some fixes. Check https://github.com/tdewolff/minify/tree/master/cmd/minify#matching-and-includeexclude-patterns for an example of using case insensitivity!

  5. movedoa commented on Feb 16, 2026

    @movedoa
    Author

    I switched to regex since in need to match case sensitive anyway but i'm not having much luck.
    Does the fix also fix regex for windows?

    I'm using --match ~(?i).*\.(html)$ but it doesn't match any html files

  6. 8790

    tdewolff commented on Feb 16, 2026

    @tdewolff
    Owner

    It works for me, but I have to enclose it in quotes for bash: minify -vo outdir --match '~(?i).*\.(html)$' -- .

    Did you use the latest release or built a release yourself? I don't think the feature is in the latest prebuild binary yet, but I can publish if you prefer.

  7. movedoa commented on Feb 20, 2026

    @movedoa
    Author

    A pre release binary would be appreciated. I tested with the current release

  8. tdewolff commented on Feb 21, 2026

    @tdewolff
    Owner

    Done!

  9. movedoa commented on Feb 25, 2026

    @movedoa
    Author

    New version works. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0