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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:45:22+00:00 2026-06-17T23:45:22+00:00

I am a real newbie regarding Regular Expressions (RegEx) I am looking for a

  • 0

I am a real newbie regarding Regular Expressions (RegEx)

I am looking for a RegEx1 to only match strings containing no spaces.
RegEx2 to only match strings containing spaces.

Example:

RegEx1 must match "abcxyz" but NOT "abc xyz".
RegEx2 must match "abc xyz" but NOT "abcxyz".

  • 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-17T23:45:23+00:00Added an answer on June 17, 2026 at 11:45 pm

    You want to learn about character classes:

    [abc] matches a character that is either an a, a b or a c.

    [^abc] matches any character that is neither an a, a b nor a c.

    Together with quantifiers and start- and end-of-string anchors, you’re all set.

    ^[^X]*$ matches a string of any length that doesn’t contain X.

    ^.*X.*$ matches any string that contains at least one X.

    ^[^X]*X[^X]*$ matches a string of any length that contains exactly one X.

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

Sidebar

Related Questions

I'm a real newbie regarding mod_rewrite so please don't laugh. I am using this
This is a real newbie question. I have simple app that selects a picture
I'm a real newbie with php and MySQL. Now I'm working on the following
I am a newbie, a real newbie when it's up to php... I am
I am complete newbie for programming and this is my first real program I
I'm a real newbie when it comes to PHP debugging so forgive my stupidity.
First off, I'm a real newbie to db and sql. However, I have to
This is a real newbie question, but I am struggling to get this to
real newbie question but why doesn't this work? I am getting use of unassigned
I have a real newbie issue. I have recently uploaded my first android app,

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.