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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:16:25+00:00 2026-06-09T08:16:25+00:00

Fast RegExp question. I must check whether a given string contains aaa but not

  • 0

Fast RegExp question.

I must check whether a given string contains aaa but not contains bbb. I can use only regexp (http://www.regular-expressions.info/).

Examples:

  • aaa – ok
  • bbb – fail
  • aaabb – ok
  • aaabbb – fail
  • aaaTEXT – ok
  • aaaTEXTbbb – fail
  • aaTEXTa – fail
  • 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-09T08:16:26+00:00Added an answer on June 9, 2026 at 8:16 am

    use this regex (?=.*a{3})(?!.*b{3}).+

    (?=.*a{3}) contain aaa

    (?!.*b{3}).+ dont contain bbb

    .+ select all string which satisfies the conditions

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

Sidebar

Related Questions

Not quite sure if it is ok to do this but, my question is:
using Fast CGI I can't get it to read the php.ini file. See my
How fast in frames per second can an iphone 4s take screenshots? What would
Can anyone suggest some fast ways to calculate the lowest common factor(excluding 1) of
Is there a fast, low-garbage way to do it? I can't just do simple
It seems fast, what could be its compression level? Can it be changed? I'm
I want to use Haskell in production. It has a lot of libraties but
I have to check the buffer input to a PHP socket server as fast
I have a 2-dimensional array of objects (predominantly, but not exclusively strings) that I
I need fast and simple way to encrypt/decrypt a lot of String data. I

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.