#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)(?<txt_pre_linka>\w+)?(?<ceo_link><a .*?>.*?<\/a>)(?<txt_after_linka>.*?)(?=<a .*?>.*?<\/a>|$|\.)"
Local $sString = "ECSE-4530 Digital Signal Processing" & @CRLF & _
"Rich Radke, Rensselaer Polytechnic Institute" & @CRLF & _
"Lecture 5: the Fourier Transform (9/11/14)" & @CRLF & _
"" & @CRLF & _
"shsdhsh<a class="yt-simple href="/watch?v=5HSn3DPHQcQ&t=2s">0:00:02</a> The Fourier Transform." & @CRLF & _
"Shshshsh<a class="yt-simple" href="/watch?v=5HSn3DPHQcQ&t=219s">0:03:39</a> Thinking ofles of a function" & @CRLF & _
"shgshshshs<a class="yt-simple" href="/watch?v=5HSn3DPHQcQ&t=463s">0:07:43</a> Derivim aiod goes to infinity"
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