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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:57:16+00:00 2026-05-10T16:57:16+00:00

Ok sorry this might seem like a dumb question but I cannot figure this

  • 0

Ok sorry this might seem like a dumb question but I cannot figure this thing out :

I am trying to parse a string and simply want to check whether it only contains the following characters : ‘0123456789dD+ ‘

I have tried many things but just can’t get to figure out the right regex to use!

   Regex oReg = new Regex(@'[\d dD+]+');   oReg.IsMatch('e4'); 

will return true even though e is not allowed… I’ve tried many strings, including Regex(‘[1234567890 dD+]+’)…

It always works on Regex Pal but not in C#…

Please advise and again i apologize this seems like a very silly question

  • 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. 2026-05-10T16:57:16+00:00Added an answer on May 10, 2026 at 4:57 pm

    Try this:

    @'^[0-9dD+ ]+$' 

    The ^ and $ at the beginning and end signify the beginning and end of the input string respectively. Thus between the beginning and then end only the stated characters are allowed. In your example, the regex matches if the string contains one of the characters even if it contains other characters as well.

    @comments: Thanks, I fixed the missing + and space.

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

Sidebar

Related Questions

sorry this is such a simple question but I can't figure it out. How
This might be a dumb question. Sorry if it is. But Im working on
This might seem like a silly question, but after asking some questions on stackoverflow
this might seem like a stupid question but I've Googled to no avail. I've
Sorry, this might be a basic/stupid/noob question - I am just trying to tweak
This might be a dumb question but I can't get this super simple script
This might not appear like a programming question, but inherently deals with code. I
Sorry if this might seem trivial for me to ask but.. I have some
This question might seem vague, sorry. Does anybody have experience writing RegEx with Objective-C
(Sorry if this sounds like a rant, but it's a real question and I'd

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.