News for hackers. Stuff that matters.
Re:The Greatest Regex Trick Ever (2014) by rprenger on Thursday July 08, 2021 @02:38PM (#27776107)
Me too. I had to look it up. This page has pretty good breakdown:

https://itnext.io/a-wild-way-to-check-if-a-number-is-prime-u...

The main trick for me was you first have to convert the number to unary, which was done outside of the regex.

There are no comments on this comment yet.