I want to be able to specify that certain regex patterns are NOT allowed.
E.g. I noticed that an adblocker was blocking one of my codesplit files, which happened to be named AdBanner.js. I renamed our module to RecommendationBanner.js to avoid this.
So I want to be able to disallow the word Ad from filenames.
Imagining rejecting files matching a pattern kind of like:
Thanks for this library!
I want to be able to specify that certain regex patterns are NOT allowed.
E.g. I noticed that an adblocker was blocking one of my codesplit files, which happened to be named
AdBanner.js
. I renamed our module toRecommendationBanner.js
to avoid this.So I want to be able to disallow the word
Ad
from filenames.Imagining rejecting files matching a pattern kind of like:
to reject file names such as:
Here's a regex playground POC showing matches vs non-matches of the above pattern example:
https://regex-playground-cloworm.vercel.app/?matches=ad_banner.tsx&matches=banner_ad.tsx&matches=AdBanner&matches=BannerAd&matches=load.tsx&matches=additional.tsx&matches=some_additional.tsx&pattern=%28%5B_.a-z0-9%5DAd%7CAd%5B_.A-Z0-9%5D%7C%5B_.0-9%5Dad_%7C%28%5B%5EA-Za-z%5D%7C%5E%29ad%5B_.A-Z0-9%5D%29
Would you accept a PR for this change?
Thanks