Does anybody know how to do math with regex? (triples)
And conditionals don't seem to work?
And conditionals don't seem to work?
^([0369]|[258][0369]*[147]|[147]([0369]|[147][0369]*[258])*[258]|[258][0369]*[258]([0369]|[147][0369]*[258])*[258]|[147]([0369]|[147][0369]*[258])*[147][0369]*[147]|[258][0369]*[258]([0369]|[147][0369]*[258])*[147][0369]*[147])*$580pts: 00(0$|3|6|9|12|15)|[^0]14|.53|^3[^38]|55|43|23|9.7
5[54]|2[437]|00($|[369]|1[25])|^8[17]|^3[29]|9.7 5[54]|2[437]|00($|[369]|1[25])|^[83][1729]|9.7 ^[378][12479]|00($|[369]|1[25])|5[45]|2[347]Remember division rules? If the sum of digits is divisible by 3, then the number is divisible by 3
So, if you have 0, 3, 6, 9, it's as you can remove them, the value won't change
Remaining are the 2, 3, etc digit numbers divisible by 3
[369](?![7238])|(?:0)12
It's sloppy and certainly not correct, but a decent score.