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

  • Home
  • SEARCH
  • 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 6469649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:01:04+00:00 2026-05-25T06:01:04+00:00

Using VS2010’s find dialog, I’m using the following regex: (?’outer’^div\#.+) input$ . I’m trying

  • 0

Using VS2010’s find dialog, I’m using the following regex: (?'outer'^div\#.+) input$.

I’m trying to create a named group of “outer” with the contents div#someId from div#someId input (in this case where someId matches .+)

However, Visual Studio is presenting the dialog: Grouped expression is missing ')'.

However, the ) is there after the +. What am I escaping or failing to escape?

EDIT:

I don’t necessarily need to used named groupings, I just need to be able to use div#someId in the replace to add another selector.

  • 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-25T06:01:05+00:00Added an answer on May 25, 2026 at 6:01 am

    It appears that Visual Studio’s find and replace uses braces { } and not parentheses ( ) for backreferences and named references.


    Since someone may find this trying to use backreferences/named grouping in a Find and Replace in Visual Studio, here’s an example of using them:

    To replace

    div#someId input
    

    with

    div#someId input,
    div#someId textarea
    

    Find: {^div\#.+ }input and replace with: \0,\n\1textarea

    It will put div#someId (with the space, which matches ^div\#.+ into the first backreference.

    Building the replace string with a backreference:
    The replace will then replace the whole string :\0

    div#someId input
    

    then a comma: ,

    div#someId input,
    

    then a new line: \n

    div#someId input,
     

    then the first group: \1

    div#someId input,
    div#someId 
    

    then the given text: textarea

    div#someId input,
    div#someId textarea
    

    Altogether makes the replace string \0,\n\1textarea

    Update: Based on this MSDN question in VS2012 backreferences are accessed using $n rather than \n, so the replace string would be: $0,\n$1textarea

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

Sidebar

Related Questions

I am using VS2010 installer to create an installer for my application named as
I'm using VS2010 express to create a game built with xna . I'm trying
Is anyone using ClickOnce with VS2010? I’m getting the following on publish, when the
Using WPF .NET 4.0 in VS2010 RTM: I can't create a fullscreen WPF popup.
I am using VS2010 B2 and EF4 B2 and trying to use Rhino Mocks
Using VS2010 with an older Win32 C/C++ Project, I'm trying to track down missing
We are using VS2010 with Wix 3.5 We create 3 merge modules and then
I'm using VS2010 and can't seem to find how to enable the search bar
I am using VS2010 Beta 2 to create an IIS hosted WCF service. I
Using VS2010 and .net V4.0 I would like to achieve the following: I already

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.