Skip to content

Instantly share code, notes, and snippets.

@wtfaremyinitials wtfaremyinitials/regex
Last active Aug 29, 2015

Embed
What would you like to do?
iPhone Model Regex
/^(4s?|5(c|s)?|6\+?)$/i
@wtfaremyinitials

This comment has been minimized.

Copy link
Owner Author

wtfaremyinitials commented Nov 15, 2014

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
You can’t perform that action at this time.