replace regex search with in op. Fix typo in JS code.