f := TFLRE.Create('^$', [rfMULTILINE]);
f.ExtractAll('abcd'+LineEnding+'defg'+LineEnding,matches) ;
writeln(length(matches))
but "on both Java and .NET, there is not considered to be a zero-length line between a final newline character and the end of the string, so if $in is:" (https://www.w3.org/Bugs/Public/show_bug.cgi?id=4543)
Here
^$
matches:but "on both Java and .NET, there is not considered to be a zero-length line between a final newline character and the end of the string, so if $in is:" (https://www.w3.org/Bugs/Public/show_bug.cgi?id=4543)