Use `String.search` instead of `RegExp.test`