Multiline regexp

background
I want to write a regular expression that matches the line which contain "Exception" and does not contain "DebugModeException".
In the following example, the first line contains "DebugModeException" and does not want to be matched

my text

0a4075e91037001531100011||0|2023-08-07 16:44:53.628||ERROR||Thread-50|com.xgi.trade.Exception:center.order.service.OrderInfoService.fullOrderInfo(OrderInfoService.java:49)|sensorsItemReportService.reportOrderInfo() error.com.sensorsdata.analytics.javasdk.exceptions.DebugModeException: Failed to send message with DebugConsumer.,entity:OrderInfo(orderId=202111100185000042534978, userId=22003240, consignee=迁移测试2, telNumber=13651368193, buyFrom=, countryId=1, provinceId=32, cityId=394, districtId=3349, orderType=1, address=考虑考虑哈, zipCode=null, postscript=, invoiceType=0, invoicePayeeType=1, invoicePayee=, invoiceTaxCode=, productTotalPrice=314900, freightPrice=0, reducePrice=314899, payPrice=1, orderFrom=H5, orderStatus=7, sendStatus=null, delete=false, pushInfoStatus=0, userAgent=Mozilla/5.0(iPhone;CPUiPhoneOS13_2_3likeMacOSX)AppleWebKit/605.1.15(KHTML,likeGecko)Version/13.0.3Mobile/15E148Safari/604.1, referer=https://www.baidu.com/link?url=8AUIta6GyGXpo--htKsTJZfMbwLLr0VHy&wd=&eqid=cdb5d600019fc20000061888855, ip=10.10.34.21, viewRedundant=, advertisementType=null, feedback=, createdBy=22003240, createdTime=2021-11-10 11:48:55.0, updatedBy=回调, updatedTime=2021-11-10 11:58:25.0)
==========================================================================




com.xgimi.tv.sdk.exception.CommonException: params decrypt failed
java.lang.RuntimeException: org.apache.http.conn.ConnectTimeoutException: Connect to userprofile-data-i.xgimi.com:80 [userprofile-data-i.xgimi.com/10.60.254.216] failed: connect timed out

my regular expression

[^{DebugModeException}].*Exception.*$|^[[:space:]]+(at|\.{3})[[:space:]]+\b|^Caused by:

go.dev/play/ test result

true	0a4075e91037001531100011||0|2023-08-07 16:44:53.628||ERROR||Thread-50|com.xgi.trade.Exception:center.order.service.OrderInfoService.fullOrderInfo(OrderInfoService.java:49)|sensorsItemReportService.reportOrderInfo() error.com.sensorsdata.analytics.javasdk.exceptions.DebugModeException: Failed to send message with DebugConsumer.,entity:OrderInfo(orderId=202111100185000042534978, userId=22003240, consignee=迁移测试2, telNumber=13651368193, buyFrom=, countryId=1, provinceId=32, cityId=394, districtId=3349, orderType=1, address=考虑考虑哈, zipCode=null, postscript=, invoiceType=0, invoicePayeeType=1, invoicePayee=, invoiceTaxCode=, productTotalPrice=314900, freightPrice=0, reducePrice=314899, payPrice=1, orderFrom=H5, orderStatus=7, sendStatus=null, delete=false, pushInfoStatus=0, userAgent=Mozilla/5.0(iPhone;CPUiPhoneOS13_2_3likeMacOSX)AppleWebKit/605.1.15(KHTML,likeGecko)Version/13.0.3Mobile/15E148Safari/604.1, referer=https://www.baidu.com/link?url=8AUIta6GyGXpo--htKsTJZfMbwLLr0VHy&wd=&eqid=cdb5d600019fc20000061888855, ip=10.10.34.21, viewRedundant=, advertisementType=null, feedback=, createdBy=22003240, createdTime=2021-11-10 11:48:55.0, updatedBy=回调, updatedTime=2021-11-10 11:58:25.0)
false	==========================================================================
false	
false	
false	
false	
true	com.xgimi.tv.sdk.exception.CommonException: params decrypt failed
true	java.lang.RuntimeException: org.apache.http.conn.ConnectTimeoutException: Connect to userprofile-data-i.xgimi.com:80 [userprofile-data-i.xgimi.com/10.60.254.216] failed: connect timed out
false

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.