using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"CGK / WIII";
string input = @"LOCATION REFERENCE UPLIFT TICKET TAIL FLIGHT AIRCRAFT DESCRIPTION UOM QUANTITY UNIT EXTENDED
NUMBER DATE NUMBER NUMBER NUMBER TYPE
SHIPPED PRICE PRICE
CGK / WIII 1208975-24101 24-MAR-21 08312411 VN-A633 VJ2432 Airbus 321 JET FUEL
USG -1,945.36 2.29783 (4,470.11)
1208975-24101 Total
-1,945.36 (4,470.11)
CGK / WIII 1208976-24101 26-MAR-21 08517889 VN-A633 VJ2432 Airbus 321 JET FUEL
USG -2,802.86 2.29783 (6,440.51)
1208976-24101 Total
-2,802.86 (6,440.51)
CGK / WIII 1208979-24101 28-MAR-21 08705413 VN-A633 VJ2432 Airbus 321 JET FUEL
USG -2,900.08 2.29783 (6,663.89)
1208979-24101 Total
-2,900.08 (6,663.89)
CGK / WIII Total
-7,648.31 (17,574.51)
Grand Total
-7,648.31 (17,574.51)";
Match m = Regex.Match(input, pattern);
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