(?ms)applies the following effective flags to the remainder of the pattern: gms m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
s modifier: single line. Allows a dot to match line terminators
Positive Lookbehind(?<=^Amount\sof\sPayments\b.*) ^start of line
Amountthe literal text Amount (case sensitive) \sa Unicode whitespace character
ofthe literal text of (case sensitive) \sa Unicode whitespace character
Paymentsthe literal text Payments (case sensitive) \ba Unicode word boundary
.*any Unicode character, repeated any number of times
Group term(?'term'[0-9]+) +matches at least one character from the set below:
0-9one character from 0 (4810) to 9 (5710)
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
\s*a Unicode whitespace character, repeated any number of times
\(the literal ( (4010 / 508 / 2816)
ethe literal e (10110 / 1458 / 6516) (case sensitive)
\)the literal ) (4110 / 518 / 2916)
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
\s*a Unicode whitespace character, repeated any number of times
^start of line
\$the literal $ (3610 / 448 / 2416)
\s*a Unicode whitespace character, repeated any number of times
Group payment_amt(?'payment_amt'[0-9]+(?:\.[0-9]+)?) +matches at least one character from the set below:
0-9one character from 0 (4810) to 9 (5710)
Non-Capturing Group(?:\.[0-9]+)? ?repeats the group contents below at most once:
\.the literal . (4610 / 568 / 2E16)
+matches at least one character from the set below:
0-9one character from 0 (4810) to 9 (5710)
\s*a Unicode whitespace character, repeated any number of times
\(the literal ( (4010 / 508 / 2816)
ethe literal e (10110 / 1458 / 6516) (case sensitive)
\)the literal ) (4110 / 518 / 2916)
.*?any Unicode character, repeated any number of times
\r?optionally matches a carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
Negated Character Class[^\S\r\n]+ +matches at least one character outside the set below:
\Sany character that is not Unicode whitespace
\ra carriage return (ASCII 13)
\na line-feed (newline) character (ASCII 10)
Group start_date(?'start_date'\d{4}-\d{1,2}-\d{1,2}) \d{4}a Unicode decimal digit, repeated exactly 4 times
-the literal - (4510 / 558 / 2D16)
\d{1,2}a Unicode decimal digit, repeated between 1 and 2 times
-the literal - (4510 / 558 / 2D16)
\d{1,2}a Unicode decimal digit, repeated between 1 and 2 times
\ba Unicode word boundary
g modifier: global. Finds all matches instead of stopping after the first