我有一个字符串
<sip:a39pbx@47.168.156.141:5060;maddr=47.168.156.141>;expires=703,<sip:739pbxast25@47.168.156.141:5060;maddr=47.168.156.141>;expires=826;
想要提取过期及其值,我尝试过使用
(.*)(expires=\d*);(.*)
但是它只给了我expires=826
的最后一个,我想选择其他或者以,
结尾。
赞赏任何意见。
答案 0 :(得分:0)
答案 1 :(得分:0)
(expires=\d+)
(expires=\d+)
Match the regular expression below and capture its match into backreference number 1 «(expires=\d+)»
Match the characters “expires=” literally «expires=»
Match a single digit 0..9 «\d+»
Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»