#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)<IdentityField\b[^>]*path=\"name\"[^>]+?\/>"
Local $sString = "<>" & @CRLF & _
" <form onSubmit={handleSubmit(onSave)} className="max-w-3xl" noValidate>" & @CRLF & _
" <IdentityField" & @CRLF & _
" control={control}" & @CRLF & _
" name="Name"" & @CRLF & _
" type="text"" & @CRLF & _
" path="name"" & @CRLF & _
" className="mt-8 mb-16"" & @CRLF & _
" />" & @CRLF & _
"" & @CRLF & _
" <IdentityField" & @CRLF & _
" control={control}" & @CRLF & _
" name="Projection Link"" & @CRLF & _
" type="text"" & @CRLF & _
" path="link"" & @CRLF & _
" className="mt-8 mb-16"" & @CRLF & _
" startAdornment={" & @CRLF & _
" <InputAdornment position="start">" & @CRLF & _
" https://{subdomain_user}.thebluelobby.com/best-dressed/" & @CRLF & _
" </InputAdornment>" & @CRLF & _
" }" & @CRLF & _
" endAdornment={" & @CRLF & _
" <InputAdornment position="end">" & @CRLF & _
" <IconButton onClick={openProjectionPage}>" & @CRLF & _
" <FuseSvgIcon>heroicons-outline:external-link</FuseSvgIcon>" & @CRLF & _
" </IconButton>" & @CRLF & _
" </InputAdornment>" & @CRLF & _
" }" & @CRLF & _
" />" & @CRLF & _
" <IdentityField" & @CRLF & _
" control={control}" & @CRLF & _
" name="Sexualisation"" & @CRLF & _
" type="boolean"" & @CRLF & _
" className="mt-8 mb-16"" & @CRLF & _
" path="sexualisation"" & @CRLF & _
" />" & @CRLF & _
" <IdentityField" & @CRLF & _
" control={control}" & @CRLF & _
" name="Active"" & @CRLF & _
" type="boolean"" & @CRLF & _
" className="mt-8 mb-16"" & @CRLF & _
" path="active"" & @CRLF & _
" />" & @CRLF & _
" <LoadingButton variant="contained" type="submit" disabled={!isEdited}>" & @CRLF & _
" Save" & @CRLF & _
" </LoadingButton>" & @CRLF & _
" </form>" & @CRLF & _
"<p>abc</p>" & @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