#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?i)([^"])((https?|s?ftp|ftps?|file)://.*?)([\s]|\"\s)"
Local $sString = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" & @CRLF & _
"<!-- This file was created with the aha Ansi HTML Adapter. http://ziz.delphigl.com/tool_aha.php -->" & @CRLF & _
"<html xmlns="http://www.w3.org/1999/xhtml">" & @CRLF & _
" testssl.sh 2.7dev from https://testssl.sh/dev/" & @CRLF & _
"<span style="font-weight:bold;"> OCSP URI </span>http://clients1.google.com/ocsp" & @CRLF & _
"<span style="font-weight:bold;"> HTTP Status Code </span> 302 Found, redirecting to "https://www.google.nl/?gfe_rd=cr&ei=ZWjmV86hE5LH8AeFmaP4Bg"" & @CRLF & _
""
Local $sSubst = "$1<a href="$2">$2</a>$4"
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