using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?P<name>^[A-Za-z\/()\'’, -]+)(\s\d{2}|\s[1-9])?\s?(\s(?P<d1>-[\d,]+|[\d,.]+)\s(?P<d2>-[\d,]+|[\d,.]+))";
string input = @"38
Frontken Corporation Berhad -651020-T Annual Report 2010
STATEMENTS OF FINANCIAL POSITION
AS OF 31 DECEMBER 2010
The Group The Company
Restated Restated
RM RM RM RM RM
ASSETS
Non-Current Assets
Property, plant and equipment 10 178,405,029 116,971,685 112,532,450 190,014 100,755
Prepaid lease payments 11 0 0 0 0 0
Investment in subsidiaries 12 0 0 0 68,192,335 30,903,191
Investment in associates 13 4,494,255 46,538,503 48,192,140 0 22,955,162
Goodwill on consolidation 14 28,311,674 4,724,073 3,749,020 0 0
Intangible assets 15 0 0 0 0 0
Deferred tax assets 16 352,360 0 0 0 0
Current Assets
Inventories 17 10,431,408 8,925,542 9,044,623 0 0
Amount due from contract customers 0 0 668,875 0 0
Trade receivables 18 67,337,237 36,900,201 41,323,668 0 0
Other receivables and prepaid expenses 18 5,125,566 5,285,410 10,169,824 27,841 43,427
Amount owing by subsidiaries 19 0 0 0 45,680,029 43,607,599
Amount owing by associates 13 4,534,039 2,098,465 3,500,059 0 0
Fixed deposits with licensed banks 12,684,190 781,627 758,232 12,000,000 0
Cash and bank balances 21,515,759 12,770,709 10,440,412 1,474,363 200,943
EQUITY AND LIABILITIES
Equity
Share capital 20 101,140,816 72,243,440 69,977,040 101,140,816 72,243,440
Reserves 21 75,102,500 63,104,940 51,689,521 9,444,784 6,607,044
Minority interests 25,901,844 182,232 651,874 0 0
Non-Current Liabilities
Term loans 22 48,314,340 25,265,019 33,200,474 0 0
Hire purchase payables 23 9,867,784 14,596,712 12,091,335 0 0
Deferred tax liabilities 16 4,389,835 3,789,267 3,466,075 0 0
Frontken Corporation Berhad -651020-T Annual Report 2010
STATEMENTS OF FINANCIAL POSITION
AS OF 31 DECEMBER 2010 (CONT’D)
The Group The Company
Restated Restated
RM RM RM RM RM
Current Liabilities
Amount due to contract customers 24 0 47,202 0 0 0
Trade payables 25 20,502,454 12,556,468 19,452,763 0 0
Other payables and accrued expenses 25 16,264,903 12,506,798 18,195,181 310,144 253,253
Amount owing to subsidiaries 19 0 0 0 16,668,838 18,707,340
Amount owing to associates 13 0 117,594 300,858 0 0
Bank overdrafts 26 1,230,283 3,365,362 5,617,839 0 0
Bank borrowings 26 22,132,228 18,367,015 18,471,490 0 0
Deferred income 0 0 19,248 0 0
Hire purchase payables 23 7,249,505 8,223,614 5,906,750 0 0
Tax liabilities 1,095,025 630,552 1,338,855 0 0";
RegexOptions options = RegexOptions.Multiline;
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