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

Page History: Using Regular Expressions In The Replace Dialog - Visual Studio

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Tue, Nov 09, 2010, 10:57 AM


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-2024, Patrick Jasinski.