Regex to find missing ConfigureAwait
<p>I have a specific pattern that I want to search for in Visual Studio.</p>
<p>Basically, I want to search for lines that contains <code>await</code>, but are missing <code>ConfigureAwait</code> at the end of the statement.</p>
<p>I have some patterns that works in regex-testers such as regex101.com, but I can't get these patterns to work in Visual Studio search. For example, the pattern <code>(?s)^(.)*(await)((?!ConfigureAwait).)*(.)?(;)</code>.</p>
<p>What I am doing wrong?</p>
<p>Edit - I want to find lines in my project such as</p>
<p><code>await DoSomeCoolThings(x, y);</code> (i.e. missing the <code>ConfigureAwait(...)</code>.)</p>
<p>but I don't want to get a match for lines such as:</p>
<p><code>await DoSomeCoolThings(x, y).ConfigureAwait(false);</code></p>