webpack serve giving "Invalid regular expression" error
I was running Node 8.9.1 instead of the latest stable version, which was causing the problems.
nvm install stable
nvm use stable
In my case (Node 12, Webpack 5.3.1), updating webpack-cli to 4.2.0 solved this error
I'm having the same issue just today. I solve it with updating my node version to the latest stable version
sudo npm cache clean -f
sudo npm install -g n
sudo n stable