using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^\w[a-z][^\d:\n]+$\s[a-z][^\d]+((-[\d,]+|[\d,]+)\s(\s+)?(-[\d,]+|[\d,]+).*)";
string input = @"RM RM
CASH FLOWS FROM/(FOR) OPERATING ACTIVITIES
Profit before tax 96,261,457 75,615,413 23,786,496 17,519,528
Adjustments for:
Depreciation of property, plant and
equipment 15,777,521 17,300,505 17,205 17,331
Depreciation of right-of-use assets 2,040,669 0 94,956 0
Interest expense 755,525 568,006 9,480 56,109
Unrealised (gain)/loss on foreign exchange (81,588) (616,303) 20,673 190,487
Allowance for impairment losses on amount
owing by subsidiaries 0 0 0 1,242,999
Allowance for impairment losses on
receivables 0 932,838 0 0
Bad debt written off 0 153,130 0 0
Gain on disposal of an associate 0 (672,207) 0 0
Property, plant and equipment written off 35 10,678 0 0
Share of results in an associate 0 (78,115) 0 0
Interest income (1,150,023) (917,220) (455,564) (549,987)
Gain on disposal of property, plant
and equipment (14,417) (164,099) 0 0
Writeback of allowance for impairment losses
on amount owing by subsidiaries 0 0 (271,455) 0
Writeback of allowance for impairment losses
on trade receivables (2,200) (10,000) 0 0
Dividend income from subsidiaries 0 0 (28,541 ,623) (23,527,968)
Operating Profit/(Loss) Before
Working Capital Changes 113,586,979 92,122,626 (5,339,832) (5,051,501)
Increase)/Decrease in:
Inventories (1,274,623) (379,713) 0 0
Trade receivables 20,924,616 (16,590,199) 0 0
Other receivables and prepaid expenses (564,806) (1,492,450) (3,691) (27,867)
Amount owing by an associate 0 1,330,780 0 0
Decrease)/Increase in:
Trade payables (1,313,328) (826,277) 0 0
Other payables and accrued expenses 3,319,226 3,376,361 503,145 1,190,933
Cash Generated From/(For) Operations 134,678,064 77,541,128 (4,840,378) (3,888,435)
Taxes paid (19,777,287) (14,218,858) 0 0
Net Cash From/(For) Operating Activities 114,900,777 63,322,270 (4,840,378) (3,888,435)
The accompanying NOTEs form an integral part of these Financial Statements.
Frontken STEAL BERGHE Sais 57
Statements Of Cash Flows
For The Financial Year Ended 31 December 2019 (cont’d)
The Group The Company
2019 2018 2019 2018
RM RM
CASH FLOWS (FOR)/FROM INVESTING ACTIVITIES
Repayment from subsidiaries 0 0 271,455 1,514,464
Purchase of property, plant and equipment (7,016,576) (7,492,297) 0 (3,689)
Addition of right-of-use assets (15,434) 0 0 0
Dividend received from subsidiaries 0 0 28,038,195 21,039,335
Additional investment/acquisition of
subsidiaries (2,636,981) (7,133,082) (2,636,981) (7,133,082)
Proceeds from disposal of an associate 0 2,496,557 0 0
Pro (ceeds)/from disposal of property, plant
and equipment 14,901 1,077,256 0 0
Net (placement)/withdrawal of fixed
deposits with licensed banks (3,608,920) 2,992,578 0 1,104,683
Interest received 1,150,023 917,220 455,564 549,987
Net Cash (For)/From Investing Activities (12,112,987) (7,141,768) 26,128,233 17,071,698
CASH FLOWS FOR FINANCING ACTIVITIES
Decrease)/Increase in amount owing
to subsidiaries 0 0 (4,851,365) 591,745
Repayment of term loans (10,677,444) (16,712,117) 0 (2,037,933)
Interest paid (755,525) (568,006) (9,480) (56,109)
Dividend paid by the Company (18,863,433) (7,335,779) (18,863,433) (7,335,779)
Dividend paid by 0 subsidiary to non-
controlling interests (1,048,152) (2,626,027) 0 0
Payment of hire purchase payables 0 (544,511) 0 0
Payment of lease liabilities (2,366,158) 0 (92,640) 0
Net Cash For Financing Activities (33,710,712) (27,786,440) (23,816,918) (8,838,076)
NET INCREASE/(DECREASE) IN CASH AND
CASH EQUIVALENTS 69,077,078 28,394,062 (2,529,063) 4,345,187
Effect of exchange rate changes 1,651,600 293,086 (59,241) 8,004
CASH AND CASH EQUIVALENTS
AT BEGINNING OF YEAR 148,940,067 120,252,919 14,110,208 9,757,017
CASH AND CASH EQUIVALENTS
AT END OF YEAR 219,668,745 148,940,067 11,521,904 14,110,208";
RegexOptions options = RegexOptions.Multiline | RegexOptions.IgnoreCase;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx