using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(^[A-Z]).*\n[A-Za-z 1-9]*\s(\d)*\s";
string input = @"Frontken Corporation Berhad (651020-T) 85
ANNUAL REPORT 2018
Notes To The Financial Statements
(cont’d)
9. EARNINGS PER SHARE
Basic earnings per share is calculated by dividing profit after taxation attributable to owners of the Company by the weighted
average number of ordinary shares in issue during the financial year.
The Group
2018 2017
Profit after taxation attributable to owners of the Company (RM) 52,256,898 29,857,681
Number of shares in issue as of 1 January 1,053,435,130 1,053,435,130
Effects of:
Treasury shares acquired (5,466,600) (5,466,600 )
Weighted average number of ordinary shares for basic earnings
per share computation as of 31 December 1,047,968,530 1,047,968,530
Basic earnings per ordinary share attributable
to equity holders of the Company (sen) 4.99 2.85
The Group has not issued any dilutive potential ordinary shares and hence, the diluted earnings per share is equal to the basic
earnings per share.
";
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