Stack Overflow In Javascript Regular