//match方法返回符合条件的集合
1.查找字符串中所有连续出现的数字,放入数组
<script>
var str = "abc123ee23f90";
console.log(str.match(/\d+/g));
console.log(str.match(/\d+/));//如果这里没有/g,只会找到第一个符合条件的放入数组
</script>

2.查找字符串中所有的数字,放入数组
<script>
var str = "abc123ee23f90";
console.log(str.match(/\d/g));
</script>

3. 提取工资
var str = "张三:1000,李四:5000,王五:8000。";
var array = str.match(/\d+/g);
console.log(array);

4. 提取email地址
var str = "123123@xx.com,fangfang@valuedopinions.cn 286669312@qq.com 2、emailenglish@emailenglish.englishtown.com 286669312@qq.com...";
var array = str.match(/\w+@\w+\.\w+(\.\w+)?/g); //(\.\w+)? 表示可能出现0次或者多次
console.log(array);

5.把里面所有的数字全部显示出来
var str="中国移动:10086,中国联通:10010,中国电信:10000";
var array=str.match(/\d{5}/g);
console.log(array);
