#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)<TextView(?:(?!fontFamily)[^>])*>"
Local $sString = "<TextView" & @CRLF & _
" android:id="@+id/txt_refer_invite"" & @CRLF & _
" android:layout_width="match_parent"" & @CRLF & _
" android:layout_height="wrap_content"" & @CRLF & _
" android:layout_below="@id/txt_refer_earn"" & @CRLF & _
" android:layout_marginTop="8dp"" & @CRLF & _
" android:fontFamily="@font/ms500"" & @CRLF & _
" android:gravity="center"" & @CRLF & _
" android:lineSpacingExtra="10sp"" & @CRLF & _
" android:paddingLeft="16.7dp"" & @CRLF & _
" android:paddingRight="16.7dp"" & @CRLF & _
" android:text="@{data.description}"" & @CRLF & _
" android:textColor="@color/color_858585"" & @CRLF & _
" android:textSize="13.3sp"/>" & @CRLF & _
"<TextView" & @CRLF & _
" android:id="@+id/txt_refer_code"" & @CRLF & _
" android:layout_width="200dp"" & @CRLF & _
" android:layout_height="48dp"" & @CRLF & _
" android:layout_below="@id/txt_refer_invite"" & @CRLF & _
" android:layout_centerHorizontal="true"" & @CRLF & _
" android:layout_marginTop="22dp"" & @CRLF & _
" android:background="@drawable/bg_refer_code"" & @CRLF & _
" android:gravity="center"" & @CRLF & _
" android:text="@{data==null?``:`Invite code : `+data.referralCode}"" & @CRLF & _
" android:textColor="#9c9c9c"" & @CRLF & _
" android:textSize="14.3sp"/>"
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