Come now, every time a colleague says they parsed a file with a regex in javascript, do you turn to them and tell them "well, you didn't actually use a _regular_ expression..."
Coming up with an efficient prime-finding algorithm like Miller-Rabin* is far from trivial.
* Technically it's just a prime-checking algorithm, but you can just generate random numbers until you've verified one of them is prime.