Une solution simple consite redéfinir la fonction
process_region
:
let
process_region
lines
=
let
region
=
String
.
concat
"\n"
(
List
.
rev
lines
)
in
if
matches
pattern
region
then
begin
print_endline
region
;
flush
stdout
end
;;