[Regex Expression] Confirmative -- World bundry
2024-08-25 16:51:49
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
最新文章
- oracle 9i相关问题
- Hadoop源码之HDFS(1)--------通信方式
- SQL 字段保留下划线后部分
- Quartz-2D
- JDBC和JPA调用储存过程 接收存储过程有返回值
- 深层解析:构建facebook应用商店推荐引擎
- JavaScript 中的非真值
- Linq to Sql自动生成实体类重名情况的处理
- navicat for mysql 将结果导出到txt文件
- MapReduce工作机制
- 基于visual Studio2013解决C语言竞赛题之1016循环打印矩阵
- POJ Christmas Game [树上删边游戏 Multi-SG]
- 使用libpcap过滤arp
- rest_famework 增删改查初第四阶段(最高级,此阶段是优化第三阶段的代码)的使用
- 机器学习(二)--------单变量线性回归(Linear Regression with One Variable)
- 使用excel开发平台活字格搭建物流管理系统
- RecyclerView的滚动事件OnScrollListener研究
- MySQL按中文拼音排序
- 2018.09.26洛谷P1084 疫情控制(二分+倍增)
- Inside the C++ Object Model:构造语意(chapter5)
热门文章
- Enabling Active Directory Authentication for VMWare Server running on Linux《转载》
- edmx文件
- (转)C#之玩转反射
- arraylist与List<;>;
- GDI+(Graphics Device Interface)例子
- oracle学习笔记(二)表的查询
- IIS报500.0错误
- hibernate多对多映射文件详解(一)
- Modified Kaprekar Numbers
- CSU 1119 Collecting Coins