Skip to content

Instantly share code, notes, and snippets.

@wtfaremyinitials
Last active August 29, 2015 14:09
Show Gist options
  • Save wtfaremyinitials/3b4aed8eef5ec1e4e5bc to your computer and use it in GitHub Desktop.
Save wtfaremyinitials/3b4aed8eef5ec1e4e5bc to your computer and use it in GitHub Desktop.
iPhone Model Regex
/^(4s?|5(c|s)?|6\+?)$/i
@wtfaremyinitials
Copy link
Author

Tests if an iPhone is any of the following models

  • 4
  • 4S
  • 5
  • 5S
  • 5C
  • 6
  • 6+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment