Find pattern which goes over a CR

As most of the tools grep/awk are line based I'm not sure how to find a pattern in a file which goes over multiple lines, without truncating or changing the file before.
What's the most effective way to find the exact pattern which contains out of 2 lines without a regex like .*\n within a sed:

1 | 1 | ERR
LIST

You could substitute the newlines while processing. Something like this?

$ cat infile
1 | 1 | ERR
LIST
2 | 2 | ERROR
LIST
3 | 3 | ERR
LIST
$ sed -ne '/ERR$/ {N; s/\n//g; p}' infile
1 | 1 | ERRLIST
3 | 3 | ERRLIST

Hi,
If your grep support this:

grep -Pzo '1 \| 1 \| ERR\nLIST' file

Regards.

Hi.

Perhaps of some help, but may require acquisition and compiling:

Match patterns, strings across lines

        1) cgrep
           https://sourceforge.net/projects/cgrep/

        2) peg
           http://www.cpan.org/authors/id/A/AD/ADAVIES/peg-3.10 (or later)

        3) bool
           https://www.gnu.org/software/bool/

        4) sift (aka "gogrep")
           https://sift-tool.org/ (verified 2015.11.05)

Some details:

cgrep   shows context of matching patterns found in files (man)
Path    : ~/executable/cgrep
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYSV ...)

peg     Perl version of grep, q.v. (what)
Path    : ~/bin/peg
Length  : 4749 lines
Type    : Perl script, ASCII text executable
Shebang : #!/usr/bin/env perl
Help    : probably available with --help

bool    print context matching a boolean expression (man)
Path    : ~/executable/bool
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYSV ...)
Help    : probably available with [     ]-h,--help

gogrep  Match, grep-like, alternate name for "sift" (man)
Path    : ~/executable/gogrep
Type    : ELF 64-bit LSB executable, x86-64, version 1 (SYSV ...)
Help    : probably available with --help

Best wishes ... cheers, drl