正则周二挑战赛 - 第八周

这次挑战是挑战#1-重复的单词 和 挑战#4-MarkDown 斜体的混合版本。 本次挑战是匹配(立即)重复的 MarkDown 列表项! 先看看例子吧 - 看例子比解释更容易理解。

重复的项目需要用 MarkDown 强调语法包裹。
第二个 '* List item' 应该被替换为 '* **List item**'

在你输入正则之后,每个测试用例都会标注为是否通过,红色是未通过,绿色是通过,因为是基于 web 的,所以只能使用基于 JavaScript 传统型 NFA (Traditional NFA)正则引擎。它类似于PCRE,但有一些不同之处。

测试用例 (0/10)

* First list item
* Second list item
* First list item
* Second list item
* Repeated list item
* Repeated list item
* Repeated list item
* **Repeated list item**
* First list item
* Repeated list item
* Repeated list item
* Final list item
* First list item
* Repeated list item
* **Repeated list item**
* Final list item
* First * First
* First * First
* First * First
* First * First
* First * First
* **First * First**
* First repeated
* First repeated
* Second repeated
* Second repeated
* First repeated
* **First repeated**
* Second repeated
* **Second repeated**
* Not repeated yet
* Second
* Not repeated yet
* Not repeated yet
* Second
* Not repeated yet
* Not
* Not repeated
* Repeated
* Repeated
* Not
* Not repeated
* Repeated
* **Repeated**
* Two spaces before second bullet
* Two spaces before second bullet
* Two spaces before second bullet
* **Two spaces before second bullet**
* Case insensitive
* CASE inSensiTIVE
* Case insensitive
* **CASE inSensiTIVE**
恭喜,你的正则通过了所有测试用例,记住要分享这个挑战哦。