• @[email protected]
    link
    fedilink
    421 days ago

    No cookie for me I just tried it in Notepad++ and VS code and it matches lines of one characer (first group I think) or the starting of a line that is an at least 2 characters string repeated twice (second group it seems)
    so the second group matches abab
    abcabc abcdeabce abcdefabcdef

    Nothing about prime numbers really only first repetition gets a match. Very interesting Honestly I used regex from years and never had to retort to something like this ever. I can only imagine it useful to check for a password complexity to not be repeated strings like I do for sites that I just want in and use a yopmail.com mail to register a fake user.

    • @NateNate60OP
      link
      121 days ago

      “at least 2 characters repeated [at least] twice” implies the string’s length is divisible by a number greater than 1.

      • @[email protected]
        link
        fedilink
        121 days ago

        Yes but the match goes for the first repetition the rest of the string isn’t matched no matter the length, again don’t find anything about prime numbers unless I checked something wrong. There is another guy who got it right it seems.