(?s)applies the following effective flags to the remainder of the pattern: gs s modifier: single line. Allows a dot to match line terminators
Non-Capturing Group(?:\G(?!^)|ABC) \Gstart of current search
ABCthe literal text ABC (case sensitive) Non-Capturing Group(?:(?!ABC).)*? *?repeats the group contents below any number of times:
Negative Lookahead(?!ABC) ABCthe literal text ABC (case sensitive) .any character
\Kresets the starting point of the reported match. Any previously consumed characters are no longer included in the final match
cthe literal c (9910 / 1438 / 6316) (case sensitive)
\d+a digit, repeated at least once
Positive Lookahead(?=.*?BCE) .*?any character, repeated any number of times
BCEthe literal text BCE (case sensitive) g modifier: global. Finds all matches instead of stopping after the first
s modifier: single line. Allows a dot to match line terminators