#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)https:\/\/(google([^\/]+\/){5}|microsoft([^\/]+\/){3}|cisco([^\/]+\/){2})(?<name>[^\/]+)"
Local $sString = "RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/ronaldo/getbilledvspaid/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/ronaldo/paymenthistory/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/ronaldo/requesthistory/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/ronaldo/runninghistory/v1" & @CRLF & _
"" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/watson/invoicedetail/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/watson/invoicesummary/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/watson/gettingValue/v1" & @CRLF & _
"RuntimeException having https://google.yahoo.com/web/kiran/cart/groups/watson/historyValue/v1" & @CRLF & _
"" & @CRLF & _
"RuntimeException having https://microsoft.word.com/ringert/rkj3/obama/funatwork" & @CRLF & _
"RuntimeException having https://microsoft.word.com/ringert/rkj3/obama/runathome" & @CRLF & _
"" & @CRLF & _
"RuntimeException having https://cisco-services.raj.com/ytr-services/gilchrist/vision" & @CRLF & _
"RuntimeException having https://cisco-services.raj.com/ytr-services/gilchrist/health"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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