updated cw2 js to use different form of regular expressions to be better compatible with existing kata