working regex in main.js