Regex not support the unicode character in script control

I’m reaching out regarding a regex pattern that I’m currently working with:

(?s)(?<=[\n\r] POLICY ?[\s]CERT ?[\s]LIST[A-Z\s/]{11,125}[\n\r] ------ ?[\s]----[-\s]{11,125}[\n\r] " + Policy + " ).*?(?=\f)

I’m encountering an issue where this pattern is no longer matching the strings as expected when using the CS script control. Interestingly, this same pattern was working correctly in Pega version 19.1, but seems to have stopped functioning after our upgrade to ver-R25.1.4. I am pretty sure this is related the page break/Form Feed character.

I was wondering if you might have experienced something similar or could offer any insights into what might have changed between these versions that could be affecting the regex behavior?

I’d really appreciate any guidance or suggestions you might have.