Test, validate and match regular expressions
This regex uses a PCRE "tempered greedy token" `((?!V2).)*` to match entire lines that do not contain the string "V2" anywhere within them. It specifically targets lines ending with either `- Dev` or `- Test`, allowing for optional trailing whitespace. With the global and multiline flags, it is ideal for filtering log outputs or text files, such as Jenkins build logs, to extract specific environment branches while strictly excluding version 2 deployments.