#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\/([a-zA-Z0-9-]+)(?=[^\/]*$)"
Local $sString = "[" & @CRLF & _
" {" & @CRLF & _
" "id": "https://asdf.com/lti/api/132456/lineitems/5c3f2665-198c-4895-bd52-8c766f528839"," & @CRLF & _
" "startDateTime": "2020-10-28 15:26:53.731"," & @CRLF & _
" "endDateTime": "2020-10-29 15:26:53.731"," & @CRLF & _
" "label": "Performance Test"," & @CRLF & _
" "resourceId": "This is resource"," & @CRLF & _
" "resourceLinkId": "This is resource link id"," & @CRLF & _
" "scoreMaximum": 1," & @CRLF & _
" "tag": "This is tag"" & @CRLF & _
" }," & @CRLF & _
" {" & @CRLF & _
" "id": "https://asdf.com/lti/544ddaf1-f248-4fa3-983b-938f531fd78f"," & @CRLF & _
" "startDateTime": "2920-10-28 15:26:53.731"," & @CRLF & _
" "endDateTime": "2920-10-29 15:26:53.731"," & @CRLF & _
" "label": "Performance Testing 2"," & @CRLF & _
" "resourceId": "This is resource"," & @CRLF & _
" "resourceLinkId": "This is resource link id"," & @CRLF & _
" "scoreMaximum": 1," & @CRLF & _
" "tag": "This is tag"" & @CRLF & _
" }" & @CRLF & _
"]"
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