#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)ID_.*?\.pdf"
Local $sString = "<ul>" & @CRLF & _
"<li><a href="/questions/237104/ID_2556.pdf"><a href="/questions/237104/ID_2556.pdf">Click here to" & @CRLF & _
"download.</a></li>" & @CRLF & _
"<li><a href="/questions/237104/ID_37.pdf">Click" & @CRLF & _
"here to download.</a></li>" & @CRLF & _
"<li><a" & @CRLF & _
"href="/questions/237104/ID_29997.pdf">Click here to download.</a></li>" & @CRLF & _
"<li><a href="/questions/237104/ID_0554.pdf">Click here to" & @CRLF & _
"download.</a></li>" & @CRLF & _
"</ul>"
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