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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:55:39+00:00 2026-05-13T18:55:39+00:00

I have an input string like this: \pard\nowidctlpar\qj\b0\scaps This Agreement\scaps0 is made and entered

  • 0

I have an input string like this:

\pard\nowidctlpar\qj\b0\scaps This
Agreement\scaps0 is made and entered
into this date, \{#DATEAGREEMENT#\} ,
by and between [removed]
(\ldblquote [removed]\rdblquote ), and its
successors and/or assigns, with
address at [removed], and
\{#TXTPLAINTIFF#\} , (\ldblquote
Plaintiff\rdblquote ), Individually,
of ___________________, and,
\{#TXTPLAINTIFFATTORNEY#\} ,
(\ldblquote Plaintiff\rquote s
Attorney\rdblquote ) of
\{#TXTATTORNEYFIRM#\} .\par

and I want to do some parsing with regex.

This is the code I’m using:

temp = Regex.Replace(temp, @"\\{#.*#\\}", "_____");

The only problem is it matches the widest set, i.e. it takes out the whole paragraph because the paragraph ends with “#\}”, how can I get to match each group? I.E., this paragraph should match it 4 times instead of once.

  • 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-13T18:55:39+00:00Added an answer on May 13, 2026 at 6:55 pm

    Did you try making it a non-greedy match?

    temp = Regex.Replace(temp, @"\\{#.*?#\\}", "_____");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If i have a string like this: $myString = input/name/something; How can i get
This is driving me nuts... I have an input string like so: String input
I have this input string(oid) : 1.2.3.4.5.66.77.88.99.10.52 I want group each number into 3
I have a input string like: $str = ':this is a applepie :) ';
I have test input string (key=value&key=value...) and key (like this D2335A9CA4924D9F914D2B47B450D436) I need to
I have a string like this: String string ='{{INPUT FILE, NUMBER OF RECORDS},{Item File,
I have a string input = "maybe (this is | that was) some ((nice
Hi I have the following date as String format. Input 2010-04-20 05:34:58.0 Output I
So I have input of a list with elements like this: calendar year 2008
I have a string like this: a b c d I process my string

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.