Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试正则表达式:/“HttpStatus” : 400,.*“ErrorCode” : “40000”/s
/“HttpStatus” : 400,.*“ErrorCode” : “40000”/s
演示
如此链接中所述,/s将内容视为单行,忽略中间的回车符和换行符。使用此修饰符,将内容视为单行,忽略中间的回车符和换行符。使用此修饰符, [\w\W]* 字符类和 .* 模式都将匹配换行符和回车符。字符类和.*模式将匹配换行符和回车符。
/s
.*