正则周二挑战赛 - 第十三周

Regex Tuesday Challenge #13 is to match strings which have a word repeated directly below the same word on the previous line (see the test cases if that isn't clear). The font is mono-spaced today, so the lines are all the same width. Be aware that the line wraps by itself if the last word is too long.

To test a regular expression on the test cases below, type it into the text input. Each test case will be marked as passed or failed respectively - you are aiming to get as many test cases as you can to pass. Note that JavaScript must be enabled for this feature to work. The regex engine used is the JavaScript regex engine; it is similar to PCRE, but with a few differences.

测试用例 (0/8)

This sentence is pretty long and this sentence is also a test
匹配

This sentence is also long and this sentence is a test
匹配

This sentence shouldn't match
不匹配
This sentence also shouldn't match as this has no words below.
不匹配


Hello world, this exclamation of surprise has this by surprise
匹配

Hello world, this exclamation of surprise is this by surprise
不匹配

While there are no repeated words on the first line, these words repeat again on this line.
匹配


"No!", shouted the boy, crying. "No!"
匹配
恭喜,你的正则通过了所有测试用例,记住要分享这个挑战哦。