Regular Expressions 101

get_units_w_or

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
(?<!\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