JavaScript Regular expressions Check if string contains pattern using .test(). Example#. var re = /[a-z]+/; if (re.test("foo")) { console.log("Match exists.
確定! 回上一頁