java正则表达式,用于在上次出现大于符号(>)/任何特殊字符后提取值并删除数字
例如:
<E72327> An exception occurred within fCMN_TREProductInstanceCreate& while calling EV_ProdInstInsert&: <E05560> This Product Instance does not reference a Customer 8482195 that covers the entire duration..
输出:
This Product Instance does not reference a Customer that covers the entire duration..
# 1 楼答案
在本例中,
*
操作符的正常贪婪行为对您有利。您可以简单地使用以下正则表达式模式:在这里,
.*>
将消耗所有内容,包括最后一个结束括号。然后,我们捕获字符串的剩余部分输出:
此处演示:
Rextester