Simplify grep regexp to be more compatible (#10765)
* Simplify grep regexp to be more compatible
The new expression also works with the BSD implementation of grep. Also,
I believe the expression did not work consistently for all possible
version numers, for example a two digit patch version would not have
been matched.
* Fix quote
* Allow for two and three part version numbers
* Select one, two and three part version numbers, reject amd64
* Also allow one to three parts for node version
* Use JS code to print node verion in correct format
* Avoid grep altogether
* Handle go1.14beta1 as well.
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>