String to check:

As it turns out, our potential shipmates are extremely superstitious. As such, we do not want anyone to enter certain words in their comments.

Requirements: 

1. Let's start checking for bad words within a sentence. We can begin with 'sink'as our first bad word. We will want to make sure this word is by itself and not part of a larger word.

/\bsink\b/gim

2. Looking good, but there are more bad words we need to account for. Let's also check for 'wreck'.

/\b(sink|wreck)\b/gim

3. Almost finished. Our final bad word to match is 'disaster'.

/\b(sink|wreck|disaster)\b/gim

-------------------------------------

/http(s)?:\/\/(www\.)?twitter(\.com|\.org)\/codeschool/gm

最新文章

  1. oracle 9i相关问题
  2. Hadoop源码之HDFS(1)--------通信方式
  3. SQL 字段保留下划线后部分
  4. Quartz-2D
  5. JDBC和JPA调用储存过程 接收存储过程有返回值
  6. 深层解析:构建facebook应用商店推荐引擎
  7. JavaScript 中的非真值
  8. Linq to Sql自动生成实体类重名情况的处理
  9. navicat for mysql 将结果导出到txt文件
  10. MapReduce工作机制
  11. 基于visual Studio2013解决C语言竞赛题之1016循环打印矩阵
  12. POJ Christmas Game [树上删边游戏 Multi-SG]
  13. 使用libpcap过滤arp
  14. rest_famework 增删改查初第四阶段(最高级,此阶段是优化第三阶段的代码)的使用
  15. 机器学习(二)--------单变量线性回归(Linear Regression with One Variable)
  16. 使用excel开发平台活字格搭建物流管理系统
  17. RecyclerView的滚动事件OnScrollListener研究
  18. MySQL按中文拼音排序
  19. 2018.09.26洛谷P1084 疫情控制(二分+倍增)
  20. Inside the C++ Object Model:构造语意(chapter5)

热门文章

  1. Enabling Active Directory Authentication for VMWare Server running on Linux《转载》
  2. edmx文件
  3. (转)C#之玩转反射
  4. arraylist与List<>
  5. GDI+(Graphics Device Interface)例子
  6. oracle学习笔记(二)表的查询
  7. IIS报500.0错误
  8. hibernate多对多映射文件详解(一)
  9. Modified Kaprekar Numbers
  10. CSU 1119 Collecting Coins