views:

530

answers:

4

Hi All, is there any way how to replace block of text (multi-line) in VS2008(VS2005)? So far I know VS2008 supports only single line replacing.

Any tips welcome, cheers X.

EDIT: thanks for tips guys. I was rather looking for some simplier option: like select multiline text, click Ctrl+H, Ctrl+V (copy text from memory) and hit Replace All.

+2  A: 

Visual Studio 2005 (and maybe before) supports regular expressions, permitting the selection and replacement of multi-line text.

John Saunders
A: 

use regex and include this inside the whitespace definition [\n\r].

Toader Mihai Claudiu
A: 

CTRL+H -> Find Options -> Use Regular Expressions | WildCards. Then you can push on the right arrow next to the "Find What" and "Replace With" textboxes and see what you can use. Descriptions here.

JP Alioto
I think this is the closest possible answer. However I was just looking for some option to use simply Ctrl+H for multilane selected text. Without any special setting.Thanks anyway.
Xabatcha
A: 

Thanks for the idea, As I'm familiar with Regular Expressions, I succeeded to replace 3 lines (including many Escape-needed characters)

Mahyar