Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex pattern to ignore multiple folders

How is the correct syntax to ignore more then one files and folders for electron-packager?

With only one arg like: --ignore=docs/* it works fine. But I want to ignore more then one folder and files like: --ignore=docs/* + dev/* + someFile.js

like image 961
Zantinger Avatar asked Oct 21 '25 01:10

Zantinger


2 Answers

This variant works for me

--ignore=\"(docs*|dev*|somefile\.js)\"

like image 164
Andrew Volodko Avatar answered Oct 23 '25 20:10

Andrew Volodko


Use the OR statement in the regular expression by using the | character in stead of the + character.

--ignore="docs/.*|dev/.*|somefile\.js"
like image 42
Christiaan van Bergen Avatar answered Oct 23 '25 21:10

Christiaan van Bergen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!