1. 程式人生 > >js 字符串匹配

js 字符串匹配

sch n) char js 字符串 nbsp col pan document bsp

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool教程(w3cschool.cn)</title>
</head>
<body>

<script>
var str = "Visit W3Cschool";
var patt1 = /w3cschool/i;
document.write(str.match(patt1));
</script>

</body>
</html>

js 字符串匹配