#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)\<li\>[^<]*?(Fandoms).*?\<\/li\>"
Local $sString = "<p>by <a rel="author" href="/users/Ellixerff/pseuds/Ellixerff">Ellixerff</a></p>" & @CRLF & _
"<p>It's happened before, but this time is different. Can the consequences of bringing the one you love back, cost you ev fin story.</p>" & @CRLF & _
"<p>Words: 8003, Chapters: 7/7, Language: English</p>" & @CRLF & _
"<ul>" & @CRLF & _
" <li>Fandoms: <a full_pat class="tag" href="https://archiveofourown.org/tags/Xena:%20Warrior%20Princess/works">Xeni Princess</a></li>" & @CRLF & _
" <li>Rating: <a full_path="true" class="tag" href="https://archiveofourown.org/tags/Mature/works">Mature</a></li>" & @CRLF & _
" <li>Warnings: <a full_f class="tag" href="https://archiveofourown.org/tags/Choose"> Chose Not To Use Archive Warnings</a></li>" & @CRLF & _
" <li>Categories: <a full_path="true" class="tag" href="https://archiveofourown.org/tags/F*s*F/works">F/F</a></li>" & @CRLF & _
" <li>Characters: <a full_path="true" href="https://archiveofourown.org/tags/Gabrielle%20(Xena)/works">Gabrielle (Xena)</a></li>" & @CRLF & _
" <li><a fi class="tag" href="https://archiveofourown.org/tags/Xena%20(Xena)/works">Xena (Xena)</a></li>" & @CRLF & _
" <li>Relationships: <a full_path="true" class="tag" href="https://archiveofourown.org/tags/Gabrielle*s*Xena/works">Gabrielle/Xena</a></li>" & @CRLF & _
"</ul>" & @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