#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(\/video\/{2}.+)\/"
Local $sString = "/video//breaking/" & @CRLF & _
"" & @CRLF & _
"/video/breaking/" & @CRLF & _
"" & @CRLF & _
"/video/etw/B7XE5I3ELCGJLVCODLJMD7MO5M/" & @CRLF & _
"" & @CRLF & _
"^(\/video\/.+)\/$" & @CRLF & _
"" & @CRLF & _
"^(?=.{4,15}$)\w{2,}\s\w{2,}$" & @CRLF & _
"" & @CRLF & _
"/(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})/;" & @CRLF & _
"" & @CRLF & _
"(?<parent>((?i)\/video\/(?-i)))(?<child>((?i)\/d\/(?-i)))" & @CRLF & _
"" & @CRLF & _
"((?<One>\/\w*video\w*\/)\d+)?(?<Two>xyz)(.*)" & @CRLF & _
"" & @CRLF & _
"^.*\b(one|two|three)\b.*$" & @CRLF & _
"" & @CRLF & _
"^(?=.*?\bmust-have\b)(?=.*?\bmandatory\b)((?!avoid|illegal).)*$" & @CRLF & _
"" & @CRLF & _
"(?=.*?\bmandatory\b)" & @CRLF & _
"" & @CRLF & _
"((?!avoid|illegal).)*$" & @CRLF & _
"" & @CRLF & _
"^(?=.*?(\/\bvideo\b\/.+\/))$" & @CRLF & _
"" & @CRLF & _
"(\/video(?=\/)\/(?=\w))"
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