示例1:
There were no issues found
Another attempt will take place in 30 minutes
示例2:
There were no issues found
Random words and numbers, this could be literally anything
Random words and numbers, this could be literally anything
Random words and numbers, this could be literally anything
Another attempt will take place in 30 minutes
问题:
RegEx中是否有任何方法可以检测单词'found'和'Another'之间是否出现任何字符?请注意,它不在1行之内,而是在多行之内。
非常感谢您的帮助。
提前谢谢您
found.*\S.*Another
和DOTALL
(s
)修饰符将对其进行匹配。 DOTALL
允许.
匹配换行符,因此它将跨多行匹配。 \S
将匹配一个非空白字符。