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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:18:13+00:00 2026-06-14T12:18:13+00:00

Following is the string i get after processing the Doc File…. $$JHFIRMPHONE-91$$ $$SYSDATE-4$$ Dear

  • 0

Following is the string i get after processing the Doc File….

$$JHFIRMPHONE-91$$
$$SYSDATE-4$$
Dear  $$RCSALUTATION-5$$,
$$PAPTRANSMITTHANKS-34$$$$IPOWERPACKAGE-56$$$$CASHCARDLOADED-57$$$$CASHCARDTYPE-58$$$$ACTIVATE-59$$$$REFUNDBALANCEDUE-63$$$$FLEXPAY-68$$$$FLEXPAYCONT-67$$
$$REFBALDU$$$$EEXT-73$$
$$RALCASHCARD-64$$
$$ACRCASHCARD-65$$
$$CHECKMONEYCREDITCARD-61$$
$$NOPAYFULL-62$$
$$RAFMEMO-38$$$$RAFMEMOPT2-44$$
$$AMENDED-24$$
$$FORMSSCHEDULES-11$$
$$FORMS_LIST$$
$$FDHANDWRITTENATTACHMENTS-35$$
$$FDATTACHMENTS-26$$
$$FURNISHEDCOPIESKEEP-69$$
$$ESORDEATH-36$$
$$GOLDGUARANTEE-20$$
$$BASICGUARANTEE1-76$$$$BASICGUARANTEE2-77$$$$BASICGUARANTEE3-78$$
$$STONLYOPC-37$$
$$STATE-14$$
$$ST_DATA$$
$$STHANDWRITTENATTACHMENTS-29$$
$$STATTACHMENTS-27$$
$$TAXCOURSE-72$$
$$REWARDTYPE-82$$$$REWARDTYPE2-83$$$$REWARDTYPE3-84$$$$HEALTHBENEFITS-92$$$$HEALTHBENEFITS2-93$$$$HEALTHBENEFITS3-94$$$$HEALTHBENEFITS4-95$$$$HEALTHBENEFITS5-96$$
$$SINCERELY-40$$
$$CLOSING-16$$
$$JHTAXSERVICE-17$$
$$RAFSTARMEMO-45$$
$$RAFSTARMEMO2-97$$

What i want is,i need to get all the text values between $$ and $$.I don’t know how to do this in an efficient way…i want some Regular Expression solution to solve this problem.I have very little knowledge about Regular Expression,so please guys help me in this…any efficient solution besides Regex will also do…thanks in advance…

  • 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-14T12:18:14+00:00Added an answer on June 14, 2026 at 12:18 pm

    Here are some regex basics, worth reading up on.

    As far as your specific problem is concerned:

    foreach(Match match in Regex.Matches(input, @"\$\$(.*?)\$\$"))
    {
        string textValue = match.Groups[1].Value;
        // process the text value
    }
    

    The regex matches, two literal $, then arbitrarily many non-linebreak characters (only as much as necessary) to get to two more $. Since matches cannot overlap, there is no danger of getting extra matches from an ending $$ to a beginning $$.

    A slightly more efficient and usually recommended regex would be:

    @"\$\$((?!\$\$).)*\$\$"
    

    It basically does the same thing, just the regex internals are a bit different (have a look into “lookaheads”).

    In fact, if you can guarantee that the text values will always just contain letters, digits, underscores and hyphens, you can use:

    @"\$\$([\w-]+)\$\$"
    

    Not also that for all three cases, some people prefer to replace \$\$ with \${2}, but I personally find that a bit unnecessary for two repetitions.

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

Sidebar

Related Questions

In the following string how to get the id after the directory media and
I have the following string fromat: session=11;reserID=1000001 How to get string array of number?
Take the following property: public string Foo { get; private set; } Using reflection,
See the following: struct A { std::string* get() const { //return const_cast<std::string*>(&m_pObj); return &const_cast<A*>(this)->m_pObj;
I have the following code : std::string Utils::get() { std::string result; result.append(1, 'x'); result.append(1,
Given the following object: public class Product { string Name {get;} int Quantity {get;}
I have the following: public class Address { public string Email { get; set;
I have the following class public class MenuVeiculo { public string Nome { get;
I have the following class public class UIControl { public string FName{ get; set;
Having the following class (.Net 3.5): public class Something { public string Text {get;

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.