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 6100505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:23:40+00:00 2026-05-23T13:23:40+00:00

In VB 2010, you can use the implied properties like C# which turns this

  • 0

In VB 2010, you can use the implied properties like C# which turns this

Private _SONo As String

Public Property SONo() As String
    Get
        Return _SONo
    End Get
    Set(ByVal value As String)
        _SONo = value
    End Set
End Property

Into

Public Property SONo() As String

What I want to do is replace the old style with the new style in a few file. Since Visual Studio’s find and replace tool allows you to do regular expressions, I assume there must be an expression I can use to do this conversion.

What would the regular expression be to do this conversion?

  • 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-05-23T13:23:41+00:00Added an answer on May 23, 2026 at 1:23 pm

    This could be dangerous as you might have logic in the property setters/getters, but if they don’t have logic you could say:

    Regular Expression:

    Private\s_(\w+)\sAs\s(\w+).*?(^\w+).*?Property.*?End\sProperty
    

    Replace:

    ${3} Property ${1} As ${2}
    

    I’ve tested this with RegexBuddy targeting the .NET regex variant. Note, that this may or may not work in the Visual Studio Find/Replace prompt as that is yet another variant.

    UPDATE: VS’s variant (Dot can’t match newlines so we need to add that functionality, also converted: \w = :a, \s = :b, {} for tags, and *? = @):

    Private:b_{:a+}:bAs:b{:a+}(.|\n)@{:a+}(.|\n)@Property(.|\n)@End:bProperty
    
    \3 Property \1 As \2
    

    The Regex does the following:

    Options: dot matches newline; case insensitive; ^ and $ match at line breaks
    
    Match the characters “Private” literally «Private»
    Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s»
    Match the character “_” literally «_»
    Match the regular expression below and capture its match into backreference number 1 «(\w+)»
       Match a single character that is a “word character” (letters, digits, and underscores) «\w+»
          Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
    Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s»
    Match the characters “As” literally «As»
    Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s»
    Match the regular expression below and capture its match into backreference number 2 «(\w+)»
       Match a single character that is a “word character” (letters, digits, and underscores) «\w+»
          Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
    Match any single character «.*?»
       Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
    Match the regular expression below and capture its match into backreference number 3 «(\w+)»
       Match a single character that is a “word character” (letters, digits, and underscores) «\w+»
          Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
    Match any single character «.*?»
       Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
    Match the characters “Property” literally «Property»
    Match any single character «.*?»
       Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
    Match the characters “End” literally «End»
    Match a single character that is a “whitespace character” (spaces, tabs, and line breaks) «\s»
    Match the characters “Property” literally «Property»
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our app provides an API that people can use to submit URLs like this:
In Visual Studio 2010, I have a Database Project. I can use this without
It is possible to use CRX with VS 2010: Can I use CodeRush Xpress
I'm looking for a TFS 2010 GUI client that I can use outside of
I am wondering does VS 2010 have something that I can use to compare
In MySQL, I can do something like: SELECT DATE_ADD('2010-07-02', INTERVAL 1 MONTH) And that
In C# you can use as to convert a type or get null: Object
I have written a custom dialog (form) that I can use in a C#
I have taken the POCO tt templates that can be used in Studio 2010
Using VS2008 and ASP.NET 3.5 (or VS 2010 / .NET 4.0?), how can I

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.