Sometimes i would like to search for text containing a new line character and there are other times i would like to replace text with a new line character.
How can i do this with visual studio 2008?
In the local searchbox ( Ctrl + F ) you can insert newlines by pressing Ctrl + Enter . If you use the global search ( Ctrl + Shift + F ) you can insert newlines by pressing Shift + Enter .
Select the cells that you want to search. On the keyboard, press Ctrl + H to open the Find and Replace dialog box, with the Replace tab active. On the Replace tab, click in the Find What box. On the keyboard, press Ctrl + J to enter the line break character.
CHANGE: The default keyboard shortcut for “Multiline Find/Replace” was Ctrl+Alt+F but it was not applied because this shortcut was already taken by “F# Interactive”. So, the new default shortcut is Ctrl+M, Ctrl+F.
Use a RegEx search:
In the Find Dialog - Expand "Find Options" Check the box for Use: Regular Expressions
Next to the search box there is now an arrow that is active, it will show you available RegEx options/values.
The value you want will be \n. So "SearchValue\n" should do it.
Be aware that that its not a standard RegEx that you use, it's VS specific. Replace can also use the RegEx values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With