times out when regex takes certain time. You can set threshold by setTimeout()