简单教程
提交运行
代码编辑器:
<script> var str="Is this his"; var patt1=/^Is/g; document.write(str.match(patt1)); </script>
x
1
<
script
>
2
var
str
=
"Is this his"
;
3
var
patt1
=
/^Is/g
;
4
document
.
write
(
str
.
match
(
patt1
));
5
</
script
>
6
运行结果: