regex search in Visual Studio 2015 -


i have specific pattern want search in visual studio 2015.

basically, want search lines contains await, missing configureawait @ end of statement.

i have patterns works in regex-testers such regex101.com, can't these patterns work in visual studio search. (for example pattern (?s)^(.)*(await)((?!configureawait).)*(.)?(;).)

what doing wrong?

edit - want find lines in project such as

await dosomecoolthings(x, y); (i.e. missing configureawait(...).)

but don't want mach lines such as:

await dosomecoolthings(x, y).configureawait(false);

if order of await , configureawait not matter, can use

(?=.*\bawait\b)(?!.*\bconfigureawait\b) 

otherwise, if consider configureawait should come after await, can use

(?=.*\bawait\b(?!.*\bconfigureawait\b)) 

efficient solution

(?=\bawait\b(?!.*\bconfigureawait\b)) 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -