How to write regex with javascript