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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:43:20+00:00 2026-06-16T20:43:20+00:00

I have the following string: SEE ATTACHED ADDENDUM TO HUD-1194,520.07 Inside that string is

  • 0

I have the following string: SEE ATTACHED ADDENDUM TO HUD-1194,520.07

Inside that string is HUD-1 and after that is 194,520.07. What I want is the 194,520.07 part.

I have written the following regular expression to pull that value out:

[^D\-1](?:-|\()?\$?(?:\d{1,3}[ ,]?)*(?:\.\d+)\)?

However, this pulls out: 94,520.07

I know it has something to do with this part: [^D\-1] “eating” to many of the 1‘s. Any ideas how I can stop it from “eating” 1‘s after the first one that appears in HUD-1?

UPDATED:

The reason for all the other stuff is I only want to match as well if the value after HUD-1 is a money amount. And the rest of that regex tries to determine all the different ways a money amount could be written

  • 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-16T20:43:21+00:00Added an answer on June 16, 2026 at 8:43 pm

    Why not something as simple as:

    .*HUD\-1(.*+)
    

    Ok, you need to be more restrictive I see based on your updated question. Try changing [^D\-1] to just (?:HUD\-1)?. For what it’s worth, your currency RegEx is vary lax, allowing input like:

    001 001 .31412341234123

    You might consider not reinventing the wheel there, I’m sure you can find a currency RegEx quickly via Google. Otherwise, I’d also suggest anchoring your RegEx with a $ at the end of it.

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

Sidebar

Related Questions

I have the following string which holds the query I want to execute: query
I have the following string: See it now! .5..%..off your purchase!.Only today. I would
I have the following template String: Hello [Name] Please find attached [Invoice Number] which
I have the following string that I am passing into [NSURL URLWithString:] and getting
I have the following string c='a,b,c,d,e,f,g' and I want to get b=['a','b','c','d,e','f','g'] so b[3]=='d,e'
I have following string: Test, User < test@test.com >, Another, Test < another@test.com >,
I have following situation: String a = A Web crawler is a computer program
I have the following string arrays: var myArray1 = new string[] {A, B, C};
I have the following: string test = CustomerNumber; or string test2 = CustomerNumberHello; the
I have the following string: <?xml version=1.0 encoding=utf-8?> <string xmlns=http://tempuri.org/UKash/Service1><UKashTransaction><txCode>99</txCode><txDescription>Failed</txDescription><settleAmount> <settleAmount><transactionId>1341481253EDFC871620</transactionId><changeIssueVoucherNumber> <changeIssueVoucherNumber><changeIssueVoucherCurr> <changeIssueVoucherCurr><changeIssueAmount> <changeIssueAmount><changeIssueExpiryDate>

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.