Update script.js

Updated ReGeX validation