匹配模式后提取字母数字字符串

问题描述 投票:-1回答:1

需要帮助提取那些在log中打印为REGISTER_NOT_FOUND的产品ID(XA363636363633)。这些porductID将更改

{“ line”:“ 2019-10-05 03:58:11.627错误[xxx-csscsc0sssscss-xxxx] 1 --- [nio-8080-exec-2] cufbsregistryImpl:\ u003c \ u003c \ u003c RegistryImpl: registerInformation():捕获到NnaException REGISTER_NOT_FOUND productId XA363636363633 requestDate 2020-07-24“

regex rex
1个回答
0
投票

REGISTER_NOT_FOUND productId (\w+)

这将从REGISTER_NOT_FOUND productId开始,然后将捕获下一个单词字符串(字母数字),直至第一个非单词字符。

Try it here!

© www.soinside.com 2019 - 2024. All rights reserved.