Regular Expressions 101

Community Patterns

123...6

get_units_w_or

1

Regular Expression
PCRE (PHP <7.3)

/
(?<!\sand\s)(?<!except\s)([A-Z0-9]{8})(?!(\sand))
/
gm

Description

matches units that are not next to 'and' (so matches all units next to 'or')

Submitted by anonymous - 4 years ago