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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:19:19+00:00 2026-06-09T18:19:19+00:00

I have the following strings: This is my testasdasd [Test(XYZ=P)] abc sdfsdf This is

  • 0

I have the following strings:

  This is my testasdasd  [Test(XYZ="P")] abc sdfsdf
    This is my testasdasd  [Test(ABC="P")] sdfsdf
    This is my testdfsdfsdf  [Test(DEF="P")] sdfsdfs
    This is my testsdfsdfsdf  [Test(GHI="P")] asdfasdasd

I want the add “, Hello” text after the “)” inn the above strings. My output should look like this:

This is my testasdasd [Test(XYZ="P"), Hello] abc sdfsdf
This is my testasdasd [Test(ABC="P"), Hello] sdfsdf
This is my testdfsdfsdf [Test(DEF="P"), Hello] sdfsdfs
This is my testsdfsdfsdf  [Test(GHI="P"), Hello] asdfasdasd

Can you help me making regex for that?

EDIT: I can’t do the above just by doing find and replace “]” I have other brackets too in my strings. I need to find [Test(..)] and the output should be [Test(…) , Hello]

  • 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-09T18:19:21+00:00Added an answer on June 9, 2026 at 6:19 pm

    You can try with the lookup expression:

    @"(\[\s*Test\s*\(.*?\)\s*)\]"
    

    and this replace expression:

    "$1,Hello]"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this Regular Expression that matches the following strings: <!-- 09-02-2009 ---> <!--
I have a string in the in the following format ,value,value2,3,(this is, a test),
I have following strings. But I need to separate them by this jsonp1343930692 and
I have the following extensionmethods for strings to be able to do this (true).As<bool>(false)
I have the following strings: Over/Under 1.5 Over/Under 2.5 Over/Under 3.5 Over/Under 4.5 This
I have this .NET regex: ^(?<prefix>([^]*))\s(?<attrgroup>(\([^\)]*\)))\s(?<suffix>([^]*))$ It properly matches the following strings: some prefix
I have the following string: const char *str = \This is just some random
I have the following string: <div id=mydiv>This is a div with quotation marks</div> I
Follow up to this question . I have the following code: string[] names =
I have this following code, here CssClass is of the String type. <asp:Panel ID=Panel1

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.