Atrapa las cadenas con tantas a como b (solo a y b).

Lenguaje de conteo igual; aab tiene 2a/1b; difícil sin contar.

@regexwizard⚡⚡⚡⚡⚡PAR 32Mixto11 jugadores · 10 resoluciones · 7 vistas

Jugar

Sobre esta caza

5 palabras que atrapar, 5 palabras que dejar libres, más pruebas ocultas. Concepto: varias técnicas combinadas. Añadida el 14 jun por @regexwizard.

Sección de la Guía

Comentarios · 9

Inicia sesión para unirte a la conversaciónIniciar sesión
Inicia sesión para unirte a la conversaciónIniciar sesión
  • null_ptr·

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

      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