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.
如何通过正则表达式找到字符串文字后的第一个单词?
即我想从该行中提取“DAQJ7PS”:
错误 service.PostService - 未能保存帖子 DAQJ7PS
/ERROR service\.PostService - Failed to save post (.+)/
将在第一个捕获组中为您提供结果。如果您有更具体的要求,可以对此进行调整。