visual studio 2015 - Multiline regex in VS2015 or NP++ -


i need replace following pattern across multiple files.

this\.dialogs = {.*};

this works fine when set single line flag here: https://regex101.com/r/df2yg3/2

however can't work in editor vs or notepad++, match single line.
how change regex or set flags in of these editors can make span multiple lines?

note want use

(?s)this\.dialogs = \{.*\}; 

if want match string this.dialogs = { last }.

to match closest };, use

(?s)this\.dialogs = \{.*?\}; 

the (?s) inline modifier forces dot match character inlcuding newline.

enter image description here

in notepad++, can use . matches newline in notepad++ option in find , replace dialog instead of (?s).

enter image description here

in visual studio 2015 (and in vs2012, vs2013, too), need use

this\.dialogs = {[\s\s\r]*?}; 

to match string this.dialogs = { closest };

enter image description here


Comments

Popular posts from this blog

ios - UITEXTFIELD InputView Uipicker not working in swift -

Hatching array of circles in AutoCAD using c# -