urlpattern icon indicating copy to clipboard operation
urlpattern copied to clipboard

matching dotfiles can be difficult

Open wanderview opened this issue 3 years ago • 0 comments

Consider a pattern intended to match dotfiles like new URLPattern({ pathname: '/.*' }). The pathname encoding algorithm will end up collapsing the /. to just . so you get a final pattern of /*.

To work around this issue you can isolate the dot in a custom regexp group like /(\\.)*.

This is forked off from #156.

wanderview avatar Jan 19 '22 16:01 wanderview