Copied from my script comments so 80 byte lines.
A note about using regular expressions in Tcl vs using regular expressions
in the SMAT DB GUI (Java)
The Cloverleaf documentation states that Java, by default, does not treat
CR or NL as regular characters so a dot (.) would not recognize a CR or NL
and you must use the expression (?s) to cause the Java regexp engine
to treat CR NL as regular characters so you can search across segments.
Tcl regexp is just the opposite. By default, CR and NL are treated as
just regular charaters so a search like ORU.*OBR would work OK in Tcl
while in Java (CL GUI) it would be like (?s)ORU.*OBR. To emulate the
Java behavior in Tcl use (?n) whch is equivalent to the -line option
when using the Tcl regex command.
Be aware of this when trying to use regular expressions in any
Tcl procedure then use the same in the CL SMAT DB GUI or vice versa!