^start of line
Negative Lookahead(?!.*\b(?:dirty|rotten)\b) .*any character (except for line terminators), repeated any number of times
\ban ASCII word boundary
Non-Capturing Group(?:dirty|rotten) dirtythe literal text dirty (case sensitive) rottenthe literal text rotten (case sensitive) \ban ASCII word boundary
.*?any character (except for line terminators), repeated any number of times
\ban ASCII word boundary
Non-Capturing Group(?:red|green|yellow) redthe literal text red (case sensitive) greenthe literal text green (case sensitive) yellowthe literal text yellow (case sensitive) \ban ASCII word boundary
.*any character (except for line terminators), repeated any number of times
\ban ASCII word boundary
Non-Capturing Group(?:apple|peach|pear) applethe literal text apple (case sensitive) peachthe literal text peach (case sensitive) pearthe literal text pear (case sensitive) \ban ASCII word boundary
.*any character (except for line terminators), repeated any number of times
$end of line
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