The problem was reading files, windows encoding uses \r\n for newlines on files, hence why the example showed using $crlf to mimic a file-read.

Diving further into PCRE, there are various pattern modifiers to force mode flags, like (*UTF), (*UTF8), etc.... I guess there's also one for triggering any sequence of newline encoding (windows \r\n for instance) For anyone else experiencing this issue, the way to do it is (*ANYCRLF)

Example:

//var %str = $+(abc,$crlf,def,$crlf,ghi) , %pat1 = /(*ANYCRLF)^def$/m , %pat2 = /^def$/m | echo -a Success! $regex(%str,%pat1) Fail: $regex(%str,%pat2)