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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:41:21+00:00 2026-06-02T16:41:21+00:00

quick question – How do you create a language of strings out of say

  • 0

quick question –

How do you create a language of strings out of say {x,y}, but negating all strings with (xy)?

My attempt’s so far:

\bx*[^(xy)]*y\b OR \by*[^(xy)]*x\b OR \b[^(xy)][xy]*[^(xy)]*\b

The last of which is the least restricted, but seems clumsy with the multiple usage of [^(xy)].

What is the laziest most convenient method for completely negating a string which contains (xy), but allows all other combinations?

Thanks

Editted: Example strings that are allowed: xxxxxxx yyyyyyyyy yxxxx yyyyyyxx

Example strings that are not allowed: xxxxyxxx xyxxxx yyyyxyyy yyyxyxy etc

  • 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-02T16:41:23+00:00Added an answer on June 2, 2026 at 4:41 pm

    If I understand the challenge correctly, you’re describing a language of strings that can start with any number of y’s, followed by any number of x’s, as those are the only two characters allowed, and you can’t place a y once an x has appeared because that would cause the string “xy” to appear.

    \by*x*\b
    

    Of course, I assume that you’re actually looking for a more general solution for cases that aren’t as simple as the one you give. In that case, a negative lookahead assertion is the easiest solution.

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

Sidebar

Related Questions

quick question I know in wordpress you can get post_content,etc but let say I
quick question. I just downloaded Visual Studio 11 Developer Preview but all tutorials to
Quick question that requires a long explanation.. Say I have two tables - one
Quick question, having a look around it seems this is the case, but it
Quick Question Lets say I have $colname = 'offer_id'; and then I want to
Quick question i imagine, but i'm having trouble getting a clear answer from googling.
quick question. In my user database I have 5 separate tables all containing different
Quick question, I found answers close to this but nothing that helps me. I
Quick question about data joining. Say I have some elements that each contain a
Quick question; I've googled around and found some answers already, but I'm a bit

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.