#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)Option 2[\s\S]*?(€\d+)[\s\S]*?Option 3[\s\S]*?(€\d+)"
Local $sString = "<b>Text : </b>" & @CRLF & _
"" & @CRLF & _
"<p>" & @CRLF & _
"Option 2 - Withdraw a specified amount by fully cashing in policies" & @CRLF & _
"" & @CRLF & _
"I wish to withdraw €6644 (insert amount and currency)" & @CRLF & _
"" & @CRLF & _
"(Please note that we will cash in the appropriate number of policies to reach the closest possible figure below the amount you require." & @CRLF & _
"The balance will then be taken across all the remaining policies." & @CRLF & _
"Please specify your fund choices for this balance overleaf.)" & @CRLF & _
"" & @CRLF & _
"Please note: If you've invested in a PruFund Protected Fund, cashing in policies will erode the Guaranteed Minimum Fund." & @CRLF & _
"" & @CRLF & _
"Notes" & @CRLF & _
"" & @CRLF & _
"1 For information on withdrawal limits, please see your Key Features Document." & @CRLF & _
"" & @CRLF & _
"2" & @CRLF & _
"" & @CRLF & _
"At least £500, ¤750 or US$750 must remain invested in each fund you hold." & @CRLF & _
"" & @CRLF & _
"3 If you have invested in one of the PruFund Range of Funds, withdrawals may be subject to a 28-day delay." & @CRLF & _
"If you also hold other funds, this could mean your withdrawal is made in two payments." & @CRLF & _
"" & @CRLF & _
"Option 3 - Withdraw a specified amount from across all policies" & @CRLF & _
"" & @CRLF & _
"I wish to withdraw" & @CRLF & _
"" & @CRLF & _
"€8532" & @CRLF & _
"" & @CRLF & _
"(insert amount and currency) from across all the policies in my bond." & @CRLF & _
"" & @CRLF & _
"Please specify your fund choices below." & @CRLF & _
"</P>"
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