Comment Re:if the asteroid is too big (Score 1) 152
If you detect it in time a small nudge may be all you need. These things travel rather long distances, a small nudge is enough to make it miss earth altogether.
No, regular expressions can not capture the complexity of that formula since it's an algorithm without memory, but with a finite set of numbers the can describe every possible match. You'll end up with a regex that incredibly long though, e.g. for 3 digits:
^0(12|23|31|47|51|69|74|83|92|01)|1(12|23|31|47|51|69|74|83|92|01)... (etc)
(It will be 5 times longer in total and the last digits aren't the correct one, it's only for showing the principle)
So it's possible but impractical.
Suggest you just sit there and wait till life gets easier.