1. Match Complete Lines That contain a Word (eg. error)
(?im)^.*\berror\b.*$
2. Match any lines That contain one of multiple words (eg, one, two , three)
(?im)^.*\b(one|two|three)\b.*$
3. Match lines that must contain multiple words
(?im)^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).+$
Python 查找含有特定单个或多个字符的行
最新推荐文章于 2024-06-23 15:26:14 发布