Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Using Regular Expressions In The Replace Dialog - Visual Studio

RSS
Modified on Wed, Nov 10, 2010, 2:41 PM by Administrator Categorized as Regular Expressions, Visual Studio and Developer Tools
Wrapping part of the Find What expression in curly braces allows you to refer to it in the Replace With expression via \number.

Example #1

For example, using
Find What = Cells\("{[A-Za-z]*}"\)
Replace With= Cells(\1.Name)

will replaceCells("uxDefaultCheckboxColumn")
withCells(uxDefaultCheckboxColumn.Name)

Example #2

To transform SQL from this...

a.City + ', ' + a.State + ' ' + a.ZipCode as CityStateZip

to this...

CityStateZip = a.City + ', ' + a.State + ' ' + a.ZipCode

use these settings in the Find and Replace dialog

Find What = ,{.+} as {.+}
Replace With= ,\2 = \1

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2012, Patrick Jasinski.