wiki/content/20201104102506-javascript_regexp_search_method.md

204 B

date id title
20201104 cc0d1937-ec92-4a2f-802d-f5fbde4e61b2 JavaScript RegExp Search Method
console.log("  word".search(/\S/)); // 2
console.log("    ".search(/\S/)); // -1