#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)[a-zA-Z]+[\s\,\-\&]*\(*(?!\d)[a-zA-Z\€\$]*\)*\s?"
Local $sString = "I. CASH FLOW FROM OPERATING ACTIVITIES" & @CRLF & _
"Profit attributable to owners of the parent 1,908 4,790" & @CRLF & _
"Depreciation, amortization, impairment and provisions (1) 927 1,080" & @CRLF & _
"Share in profit (loss) from equity-accounted companies (net of dividends received) 13 (63) (110)" & @CRLF & _
"Change in fair value of currency and commodity derivatives (2) 26 81 (3,608)" & @CRLF & _
"Capital gains and losses on asset disposals (3) (364) (20)" & @CRLF & _
"Profit (loss) from discontinued operations and disposal gain (before tax) (110) (990)" & @CRLF & _
"Profit attributable to non-controlling interests 55 62" & @CRLF & _
"Other (4) 217 1,206" & @CRLF & _
"Cash flow from operations, before change in working capital 2,651 2,410" & @CRLF & _
"Change in inventories and work-in-progress 14 (347) (308)" & @CRLF & _
"Change in operating receivables and payables (5) 15, 23, 26 219 561" & @CRLF & _
"Change in other receivables and payables 15, 23 (40) 63" & @CRLF & _
"Change in working capital (168) 316" & @CRLF & _
"TOTAL I (6) 2,483 2,726" & @CRLF & _
"II. CASH FLOW USED IN INVESTING ACTIVITIES" & @CRLF & _
"Capitalization of R&D expenditure (7) 10 (364) (286)" & @CRLF & _
"Payments for the purchase of intangible assets, net of proceeds (8) (324) (262)" & @CRLF & _
"Payments for the purchase of property, plant and equipment, net of proceeds (9) (704) (740)" & @CRLF & _
"Payments arising from the acquisition of investments or businesses, net (810) (54)" & @CRLF & _
"Proceeds arising from the sale of investments or businesses, net 2 3,060" & @CRLF & _
"Proceeds (payments) arising from the sale (acquisition) of investments and loans (10) 5 (1,974)" & @CRLF & _
"TOTAL II (2,195) (256)" & @CRLF & _
"III. CASH FLOW FROM (USED IN) FINANCING ACTIVITIES" & @CRLF & _
"Change in share capital – owners of the parent - -" & @CRLF & _
"Change in share capital – non-controlling interests (9) (4)" & @CRLF & _
"Acquisitions and disposals of treasury shares 18.b (38) (449)" & @CRLF & _
"Repayment of borrowings and long-term debt 22 (73) (66)" & @CRLF & _
"Increase in borrowings 22 682 1,058" & @CRLF & _
"Change in repayable advances 21 (24) (25)" & @CRLF & _
"Change in short-term borrowings 22 10 449" & @CRLF & _
"Dividends and interim dividends paid to owners of the parent 18.e (612) (340)" & @CRLF & _
"Dividends paid to non-controlling interests (30) (32)" & @CRLF & _
"TOTAL III (94) 591" & @CRLF & _
"CASH FLOW FROM OPERATING ACTIVITIES OF DISCONTINUED OPERATIONS TOTAL IV 171 14" & @CRLF & _
"CASH FLOW USED IN INVESTING ACTIVITIES OF DISCONTINUED OPERATIONS TOTAL V (111) (52)" & @CRLF & _
"CASH FLOW USED IN FINANCING ACTIVITIES OF DISCONTINUED OPERATIONS TOTAL VI (8) (198)" & @CRLF & _
"EFFECT OF CHANGES IN FOREIGN EXCHANGE RATES TOTAL VII 15 (17)" & @CRLF & _
"NET INCREASE IN CASH AND CASH EQUIVALENTS I+II+III+IV+V+VI+VII 261 2,808" & @CRLF & _
"Cash and cash equivalents at beginning of period 1,659 1,926" & @CRLF & _
"Cash and cash equivalents of discontinued operations at beginning of period 186 180" & @CRLF & _
"Cash and cash equivalents at end of period 16 1,926 4,914" & @CRLF & _
"Cash and cash equivalents of discontinued operations at end of period 180 -" & @CRLF & _
"NET INCREASE IN CASH AND CASH EQUIVALENTS 261 2,808"
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