JavaScript 匹配关键字
2019-10-12 本文已影响0人
秋名山至尊宝
string: (string).match; 返回值:匹配到的字符串;
Array:[ 数组].includes返回值: true、 false;
正则:new RegExp(); RegExp 对象有 3 个方法:test()、exec() 以及 compile()。 test() 方法检索字符串中的指定值。返回值是 true 或 false。
string: (string).match; 返回值:匹配到的字符串;
Array:[ 数组].includes返回值: true、 false;
正则:new RegExp(); RegExp 对象有 3 个方法:test()、exec() 以及 compile()。 test() 方法检索字符串中的指定值。返回值是 true 或 false。