Last active
October 3, 2015 18:08
-
-
Save brianfoshee/2500953 to your computer and use it in GitHub Desktop.
Regular Expression to match Apple Provisioning Profile strings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## This regular expression will match strings in the form of an Apple Provisioning Profile (iOS, at least) | |
| ## Example: A0D25BDA-BX3F-6AD1-BC65-6DC9G0S13BAK | |
| ## Simplified a bit from the first version of the gist. | |
| str = "some string with A0D25BDA-BX3F-6AD1-BC65-6DC9G0S13BAK that in the middle of it" | |
| new_str = str.sub(/[[A-Z\d]{4,12}-]{1,36}/,new_profile_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment