<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
var sel = '白'
var arr = ['白色', '小白', '红色', '紫色', '黑色']
for (let index = ; index < arr.length; index++) {
var txt = new RegExp(sel);
if(txt.test(arr[index])) {
console.log(arr[index])
} else {
console.log('不包含')
}
}
</script>
</body>
</html>

最新文章

  1. bzoj2702[SDOI2012]走迷宫
  2. IOS的Crash情况在Crashlytics平台上统计解决方案的一点遗憾(截止到2015年6月14日)
  3. 树莓派搭建安装mysql
  4. 【BZOJ-4213】贪吃蛇 有上下界的费用流
  5. Linux 中常见的命令行,持续更新
  6. MyString(重写String)
  7. Sqoop安装配置及数据导入导出
  8. xxx is not in the sudoers file.This incident will be reported.的解决方法
  9. 《Linux命令行大全》系列(一、shell是什么)
  10. ecstore生成二维码
  11. SQL查询 addScalar()或addEntity()
  12. Java 网络编程(六) 使用无连接的数据报(UDP)进行通信
  13. 不停止MySQL服务增加从库的两种方式【转载】
  14. Robotframework-Appium系列:安装配置
  15. ./init的含义
  16. vue之render基本书写方法
  17. listcard记录
  18. django ---forms组件
  19. 翻译 – 从心理学角度看UX设计
  20. 06 Locking and Latching

热门文章

  1. 一双木棋(chess)
  2. [杂题]:B/b(二分答案)
  3. 团队冲刺DAY1
  4. Intel processor brand names-Xeon,Core,Pentium,Celeron----Xeon
  5. sql server中实现mysql的find_in_set函数和group_concat类似功能的讲解
  6. 关系型数据库MySQL(三)_触发器
  7. spring boot 尚桂谷学习笔记10 数据访问02 mybatis
  8. C# 笔记 获取程序当前目录
  9. 安装vue开发环境→安装淘宝镜像的时候报错
  10. 牛客网练习赛 2 烟花(概率dp)