For a second I thought I was still in the thread about monkeys face-rolling typewriters until the heat death of the universe not eventually producing Hamlet
Programmer Humor
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.
Empty input Or input of exactly 1 character Or input of at least 2 characters, followed by at least 1 something (idk what \1 matches)
Did I get it (almost)?
\1 is group 1 which is inside ()
, so second part is repeated 2 or more times of 2 or more char.
Interesting.
So that means match any string that is made entirely of a single repeating sequence, where repititon is possible.
It matches for non-primes and doesn't match for primes.
It matches “yo momma”.
The pipe is throwing me off because usually I have to do parentheses for that to work...
Looks like APL to me.
All my homies hate regexs. That's actually the best use case I found for LLMs so far : I just tell it what I want it to match or not match, and it usually spits out a decent one
That sounds…
Easier to get almost right than actually learning the subject.
Much, much harder to get completely right than actually learning the subject.
So yes, basically the archetypal use case for LLMs.