I have the following text from a file that I need to find the two values (60 & 1),two amounts and the two dates. The sample text is:
Amount of Payments
60
(e)
$ 1160.87 (e)
Monthly, Starting
2022-07-08 00:00:00 (e)
1
(e)
$ 895.85 (e)
2027-07-08 00:00:00 (e)
So far I have the following Regex pattern to pull the first value, first amount and first date, but I am not sure how to go about getting the rest of the information.
string pattern = @"Amount\sof\sPayments[\n|\s]+(?'term'[0-9]{1,3})[\n|\s]+\(e\)[\n|\s]+\$\s(?'payment_amt'[+-]?[0-9]{1,3}(?:,?[0-9]{3})*\.[0-9]{2})[\n|\s]+\(e\)[\n|\s]+Monthly\,\sStarting[\n|\s]+(?'start_date'\d{4}\-\d{1,2}\-\d{1,2})";