using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?<=\(INR\))(.|\n)*(?=Due Date)";
string input = @"Format : ExpoHub
123456789
expohub street
ABC
123456
India
Billed To Date of Issue Invoice Number Amount Due (INR)
Nagesh Reddy. 22/04/2020 873101. Rs.26,178.00
Due Date
22/05/2020
Description Rate Qty Line Total
Shared Hosting Rs.25,878.00 1 Rs.25,878.00
LateFee Rs.300.00 1 Rs.300.00
Rs.0.00 1 Rs.0.00
Subtotal 26,178.00
Tax 0.00
Total
Amount Paid
26,178.00
0.00
Amount Due (INR) Rs.26,178.00";
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