One of my favorite regular expression parlor tricks is this regular expression which matches collections with a prime number of elements in it.

/^(?!(.{2,})\1+$).+/

https://regex101.com/r/e42RuL/1

regex101: build, test, and debug regex

Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

regex101
@d0nut bruh this is like hieroglyphics lol. what does this even do. i love some of the streams youve done btw
@d0nut I think that's my biggest problem with regex is, i have to learn a whole new laguage just to parse the output of another language. too lazy. or give it to me in json

@strf0x It's definitely a whole new thing to learn xD

I just happened to have a summer where I was a less productive intern that I probably should've been that spent wayyyyy too much time on the regular expression questions on stackoverflow xD