Regular Expressions 101

Community Patterns

ORDERS96B MATCH ITEM LINES METHOD 1

0

Regular Expression
PCRE (PHP <7.3)

/
^LIN[\s\S]*?^DTM.*
/
gm

Description

Same as "ORDERS96B MATCH ALL ITEM LINES METHOD 1" with a lazy quantifier to get multiple matches. This works only, if the last line of a item line elemet is known, otherwise try METHOD 2

From the first line string of an item line --> ^LIN over line breaks --> [\s\S]? to the last line string of an item line --> ^DTM.

Submitted by Raik Zobel - 4 years ago