\ba Unicode word boundary
location:the literal text location: (case insensitive) \s*a Unicode whitespace character, repeated any number of times
Group 1((?:(?!location:|unit|format).)+) Non-Capturing Group(?:(?!location:|unit|format).)+ +repeats the group contents below at least once:
Negative Lookahead(?!location:|unit|format) location:the literal text location: (case insensitive) unitthe literal text unit (case insensitive) formatthe literal text format (case insensitive) .any Unicode character (except for line terminators)
the literal (3210 / 408 / 2016)
Non-Capturing Group(?:format )? ?repeats the group contents below at most once:
format the literal text format (case insensitive) unit the literal text unit (case insensitive) Non-Capturing Group(?:(?!location:).)+ +repeats the group contents below at least once:
Negative Lookahead(?!location:) location:the literal text location: (case insensitive) .any Unicode character (except for line terminators)
\ba Unicode word boundary
12345566the literal text 12345566 \ba Unicode word boundary
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters