^.?$|^(..+?)\1+$

<answer>

Matches strings of any character repeated a non-prime number of times

https://www.youtube.com/watch?v=5vbk0TwkokM

3 points

Looks like APL to me.

permalink
report
reply
43 points

no

permalink
report
reply
2 points

that is correct!

permalink
report
parent
reply
1 point

nononono

permalink
report
parent
reply
24 points

Syntactically valid Perl

permalink
report
reply
10 points
*

Something like

!“A line with exactly 0 or 1 characters, or a line with a sequence of 1 or 3 or more characters, repeated at least twice”!<

permalink
report
parent
reply
3 points

It’s a line with a sequence of two or more characters repeated at least twice.

permalink
report
parent
reply
4 points

Only the part after the pipe character. The pipe character works as an “or” operator. RegalPotoo is right.

permalink
report
parent
reply
8 points

You’re misreading the ..+? part. That means 2 or more characters, non greedy.

permalink
report
parent
reply

Just waiting for the oppertunity to hide this in prod.

permalink
report
reply
3 points

It matches “yo momma”.

permalink
report
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.4K

    Monthly active users

  • 887

    Posts

  • 9K

    Comments

Community moderators