Skip to content

Instantly share code, notes, and snippets.

@JoshuaCarroll
Created August 2, 2017 21:48
Show Gist options
  • Save JoshuaCarroll/bb8cc7238340fe05aa1cc2aa308f6b7a to your computer and use it in GitHub Desktop.
Save JoshuaCarroll/bb8cc7238340fe05aa1cc2aa308f6b7a to your computer and use it in GitHub Desktop.
Regular expression for validating and parsing credit/debit card magnetic stripe data
^%B([0-9]{1,19})\^(.*?)\^([0-9]{1,4})([0-9]{1,3})(.*?)\?.*?;([0-9]{1,19})=([0-9]{1,4})([0-9]{1,3}).*?\?(.*?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment