Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:25:47+00:00 2026-06-15T20:25:47+00:00

I am looking for a regualr expression to find in VS2010 solution files for

  • 0

I am looking for a regualr expression to find in VS2010 solution files for string.empty and replace with string.IsNullOrEmpty

for ex if (strText != string.Empty) to string.IsNullOrEmpty(strText)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:25:48+00:00Added an answer on June 15, 2026 at 8:25 pm

    In VS2012 this has become a lot easier, since the Regex language used was improved quite a bit:

    Search:

     \b(?<variable>[\w_-]+)\s*==\s*string.Empty
    

    Replace:

     string.IsNullOrEmpty(${variable})
    

    The overall idea is the same for Visual Studio 2010:

    Search:

     {[A-Za-z0-9_\-]+}:b*==:b*string\.Empty
    

    Replace:

     string.IsNullOrEmpty(\1)
    

    And as others have noted, be sure to have either unit tests to verify you didn’t break anything, or check each replacement to be sure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a regular expression that can find the alpha representation of a
I am looking for a single regular expression that will replace all replace me
I'm looking for a regular expression for Java to find digits structured like this:
I'm looking for a regular expression, but can't find. Parsing a text file looking
Looking to find the appropriate regular expression for the following conditions: I need to
I'm trying to filter thousands of files, looking for those which contain string constants
I'm looking to create a VBA regular expression that will find the existence of
I'm looking for a way to find the smallest possible regular-expression that accepts a
I'm looking for a regular expression that will replace strings in an input source
I'm looking for a regular expression to use in Refex.Replace that allows me to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.