RegEx mask

There is no predefined mask for the behavior you described. However, you can use RegEx mask type with the edit mask: "\d{1,4}(\.\d+)?" to achieve it. If you also need negative numbers to be entered into the editor, you can use this edit mask: "-?\d{1,4}(\.\d+)?". Please try this approach and let me know the result.
这是我drain3的配置内容: [MASKING] masking = [ {"regex_pattern":"\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2},\\d{3}", "mask_with": "TIME"}, {"regex_pattern": "\\[(\\d{4}-(?:[A-Za-z]{3}|\\d{2})-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{6})\\]", "mask_with": "DATATIME"}, {"regex_pattern": "(\\d{4}-(?:[A-Za-z]{3}|\\d{2})-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3})", "mask_with": "DATATIME"}, {"regex_pattern": "(eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]+)", "mask_with": "JWT"}, {"regex_pattern": "\\[[a-zA-Z0-9-]+(?:-exec-\\d+)?\\]", "mask_with": "EXEC"}, {"regex_pattern": "Route\\{[^}]*\\}", "mask_with": "ROUTE"}, {"regex_pattern": "Response([^)]*)", "mask_with": "RESPONSE"}, {"regex_pattern": "Station Id:[^)]*", "mask_with": "STATION_ID"}, {"regex_pattern": "username :[^)]*", "mask_with": "username"}, {"regex_pattern": "LOGIN USER :[^)]*", "mask_with": "LOGIN_USER"}, {"regex_pattern": "[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+", "mask_with": "UUID"}, {"regex_pattern": "TraceID: [a-zA-Z0-9]+", "mask_with": "TRACE_ID"}, {"regex_pattern": "SpanID: [a-zA-Z0-9]+", "mask_with": "SPAN_ID"} ] mask_prefix = <: mask_suffix = :> 现在有这么一串字符串: "<:DATATIME:> recommendationservice --- <:TRACE_ID:> <:SPAN_ID:> List Recommendations product_ids=['66VCHSJNUP', '1YMWWN1N4O', 'LS4PSXUNUM', 'OLJCESPC7Z', '2ZYFJ3GM2N']", 我想要将他匹配成这样: "<:DATATIME:> recommendationservice --- <:TRACE_ID:> <:SPAN_ID:> List Recommendations <:PRODUCT_IDS:>,我应该怎么在drain3的配置中添加规则
03-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值