プロパティ(R) Property Type (R)
正規表現オブジェクト.test(パターンマッチテスト文字列) Regular expression object format. Test (string PATANMATCHITESUTO)
Commentary
調べる文字列にパターンマッチする文字列があるかどうかを調べます。 Determine whether the string matches the pattern string check. 一致する文字列がある場合にはtrue、なければfalseを返します。 If the string matches the true, if it returns false.
サンプルコード Sample code
str = "RegExp Sample Text. String Match Test."; str = "RegExp Sample Text. String Match Test.";
reObj = new RegExp(); reObj = new RegExp ();
result = reObj.test("Te"); result = reObj.test ( "Te");
outputs[0] = "テスト結果は"+result+"です"; outputs [0] = "test result" + result + "";