javascript test if string contains regex