zoukankan      html  css  js  c++  java
  • [Regex Expression] Confirmative -- World bundry

    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.

    /sink/gim

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

    /(sink|wreck)/gim

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

    /(sink|wreck|disaster)/gim

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

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

  • 相关阅读:
    webform传值
    webform控件以及使用
    SQL Server 基本数据类型
    数据库设计三大范式
    第一阶段考试
    弹出层
    三级联动日期选择
    DOM例题
    JS方法
    DOM
  • 原文地址:https://www.cnblogs.com/Answer1215/p/5245989.html
Copyright © 2011-2022 走看看