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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:41:12+00:00 2026-06-13T22:41:12+00:00

When having strings like helloworld worldhello ollehdlrow Is there a regex that can match

  • 0

When having strings like

helloworld
worldhello
ollehdlrow

Is there a regex that can match all those cases? So, basically a pattern that will match all strings that contain all characters, in unspecified order.

I tried using

/[helloworld]{10}/

but this doesn’t work for obvious reasons, as it will also match eeeeeeeeee.

  • 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-13T22:41:13+00:00Added an answer on June 13, 2026 at 10:41 pm

    You definitely don’t want to use regular expressions for this.

    In order to check if a character exists in the string, in your case, you would have to use a positive lookahead. It would look something like this (?=a) to check for the character a. Thats fine. If we want to check for a string containing the character a and b we can do /^(?=.*a)(?=.*b)/. Problems arise if we want to check for multiple as.

    View this example: http://regex101.com/r/iV2jC8

    As you can see, the regex has been “told” to look two times for the letter ‘a’. However, the first case still matches. This is because the engine does not save the position where it initially found the first ‘a’, and thus the next assertion finds the very same a. This is the case in all three of the examples. So in reality, none of them are really being validated.

    You would have to do something like this: http://regex101.com/r/cR8eR4

    Which as you probably can imagine will quickly get out of hand with larger patterns.

    I hope this helps, best of luck.

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

Sidebar

Related Questions

Having string resources in Strings.resx/Strings.Designer.cs, used like this: myObject.DoSomething(Strings.HelloWorld); can I capture the resource
I have an NSMutableArray (detailsMA)having 100 strings like @True. Am storing that array in
There is a string having a dot form like this : 1.1.3 I want
I´m having some trouble retrieving a collection of strings in a projection: say that
I am having string like: NSString *str = @Helloworld.123 456; I need to get
Im having some strings like these aa11b2s abc1sff3 a1b1sdd2 etc.... i need to change
It seems like PHP allows having strings (like the string foo in the example
I get a page response from a web and it is having strings like
Having a list of strings like SDCVisual, SDCRoller, SDCGame how could I get in
i'm wondering why i'm having troubles when inserting strings in db like hey hey

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.