#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=<span>)(.|\n)*?(?=<\/span>)"
Local $sString = "<span>" & @CRLF & _
" Do not use hard returns to break lines; use the word wrap feature." & @CRLF & _
" </span>" & @CRLF & _
" <span>" & @CRLF & _
" The" & @CRLF & _
" <strong>abstract paragraph</strong>" & @CRLF & _
" cannot exceed 250 words. A maximum of 2 tables and/or figures are acceptable. Deduct 50 words from the maximum word count for each included table or figure. Figures" & @CRLF & _
" should be no larger than 3.5 inches wide by 4.0 inches high, legible at these dimensions, and cropped to eliminate extra white space. Tables must fit and be legible" & @CRLF & _
" within a 3.5 inch column." & @CRLF & _
" </span>"
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