Contact

admin

About Me · Send mail to the author(s) E-mail · Twitter

At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.

Feed Icon

Tags

Open Source Projects

Archives

Blogs of friends

Now playing [?]

Error retrieving information from external service.
Audioscrobbler/Last.fm

ClustrMap

Regular Expressions Search and Replace in VS

Posted in Visual Studio at Tuesday, November 15, 2005 2:38 AM W. Europe Standard Time

Today I had to change a whole lot of code like this

public CheckBox ChkBypassProgram
{
    get
    {
        return chkBypassProgram;
    }
}

to the following naming convention.

public CheckBox BypassProgramCheckbox
{
    get
    {
        return chkBypassProgram;
    }
}

Completing the task doing a manual search and replace would be nerve-racking and error-prone. I came up with a handy regular expression that leverages Visual Studio's Regular Expression Search and Replace.

Find: <Chk{.+}>
Replace with: \1Checkbox

Now playing: A-HA - Minor Earth Major Sky - To let you win

All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
 
[Captcha]Enter the code shown (prevents robots):

Live Comment Preview