Skip to content

Instantly share code, notes, and snippets.

@pdg137
Created November 6, 2014 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdg137/5a37ebaa860cac7aeeca to your computer and use it in GitHub Desktop.
Save pdg137/5a37ebaa860cac7aeeca to your computer and use it in GitHub Desktop.
Regex for testing divisibility by three
/^([147][0369]*[258]|([147][0369]*[147]|[258])([258][0369]*[147]|[0369])*([258][0369]*[258]|[147])|[0369])+$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment