fix js when regexp doesn't match