#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(^m=[a-zA-Z]*) ([0-9]{0,5})"
Local $sString = "v=0" & @CRLF & _
"o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com" & @CRLF & _
"s=" & @CRLF & _
"c=IN IP4 host.biloxi.example.com" & @CRLF & _
"t=0 0" & @CRLF & _
"m=audio 49174 RTP/AVP 0" & @CRLF & _
"a=rtpmap:0 PCMU/8000" & @CRLF & _
"m=video 49170 RTP/AVP 32" & @CRLF & _
"a=rtpmap:32 MPV/90000" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"m=audio 49170 RTP/AVP 0" & @CRLF & _
"a=rtcp:53020" & @CRLF & _
"" & @CRLF & _
"m=audio 49170 RTP/AVP 0" & @CRLF & _
"a=rtcp:53020 IN IP4 126.16.64.4" & @CRLF & _
"" & @CRLF & _
"m=audio 49170 RTP/AVP 0" & @CRLF & _
"a=rtcp:53020 IN IP6 2001:2345:6789:ABCD:EF01:2345:6789:ABCD"
Local $sSubst = "$1 5060"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm