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.
我需要一个正则表达式来解析我的文本模式:CR-000000。可能有一个文本,但里面的某个地方是模式,有时是两个 - 我只需要提取与模式匹配的部分
我创建了以下模式,但仍然无法正常工作 [CR-]{6}[0-9]
[CR-]{6}[0-9]
来自以下示例:已为以下位置创建了更改请求。CR-0001083 单击此链接访问更改请求更改请求 ID:CR-0001086 属性 ID:CK1014 - 输出将为 CR-0001083 CR-0001086
谢谢,CR-[0-9]{7} 解决了这个问题!