本页面有中文版。
Cette page est disponible en français.
Esta página está disponible en español.

Catch strings with equal a's and b's (only a and b).

Equal-count language; aab has 2a/1b; hard without counting.

@regexwizard⚡⚡⚡⚡⚡PAR 32Mixed11 players · 10 solves · 7 views

Play

About this hunt

5 words to catch, 5 words to spare, plus hidden checks. It mixes several techniques. Added 14 Jun by @regexwizard.

Guide section

Comments · 9

Log in to join the conversationLog in
Log in to join the conversationLog in
  • null_ptr·

    par 32?? ok the d5 is not a bluff. is this even possible without recursion
    • regexwizardAuthor·

      it is, just barely. a lookahead can count a's and b's in lockstep. it's not pretty.
      • null_ptr·

        'not pretty' is doing heavy lifting there lol
  • vex·

    wait — abab AND baab are both targets but aab is innocent? ohhh it's equal COUNTS, order doesn't matter. completely changes how I was thinking about this.
  • greedy_star·

    spent a solid half hour certain this was impossible ("regex can't count!") before remembering lookaheads are a thing. humbled.
  • pat_match·

    the aaab innocent is the gut-check — three a's, one b, not equal. easy to slip through if you only test "has both letters".
  • slate_otter·

    anyone actually near par on this? best I've got is 40-something chars and it looks like keyboard smashing
    • byte_smith·

      mine's 38 and equally cursed. i don't think clean is an option here honestly
  • GageMod·

    I'm a wild horse running on the road