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.
我有这个字符串:OK(0 毫秒)并且需要使用正则表达式提取以下内容:
所有部分可能会有所不同,但始终是 TEXT(十进制文本)
而且,它必须用正则表达式来完成
使用这个正则表达式([a-zA-Z]+)\s\((\d+)\s([a-zA-Z]+)\)
([a-zA-Z]+)\s\((\d+)\s([a-zA-Z]+)\)
OK在组 1
OK
0在第 2 组
0
msec在第 3 组
msec