#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "([\w\.:-]*)=(\d)+(,|})"
Local $sString = "{ok_sock_to_host_close_10.205.148.134:32001=6, ok_sock_to_host_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=6, ok_sock_to_host_10.205.148.134:32001=6, ok_sock_to_host_127.0.0.1:8080=5, ok_permit_to_host_acquired_127.0.0.1:8443=5, ok_sock_to_host_real_open_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=2, ok_sock_to_host_real_open_10.205.148.134:32001=2, ok_permit_to_host_acquired_10.205.148.134:32001=6, fail_sock_to_host_127.0.0.1:8443=5, ok_permit_to_host_released_127.0.0.1:8080=5, ok_sock_to_host_real_close_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=2, ok_sock_to_host_real_close_10.205.148.134:32001=2, ok_sock_to_host_close_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=6, ok_sock_to_host_real_open_127.0.0.1:8080=5, ok_sock_to_host_real_close_127.0.0.1:8080=5, ok_sock_to_host_close_127.0.0.1:8080=5, ok_permit_to_host_released_127.0.0.1:8443=5, ok_permit_to_host_released_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=6, ok_permit_to_host_acquired_ssl1zn3-m1-ap.ssodev-bo.mtv1.vrsn.com:32001=6, ok_permit_to_host_acquired_127.0.0.1:8080=5, ok_permit_to_host_released_10.205.148.134:32001=6}"
Local $sSubst = ""\1":\2\3"
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