I have a card swipe and I am creating a on site Kioske and need to prefill a credit card form after card swipe. I am not sure why It is not recognizing any cards. Here is an example of a swipe:
%B5500005555555559"TORRANCEJACK G P "2009206000000000000326000000
Can someone explain why it is not passing the following regex pattern exec?
// MasterCard starts with 51-55, and is 16 digits long.
var pattern = new RegExp("^%B(5[1-5][0-9]{14})\\^([A-Z ]+)/([A-Z ]+)\\^([0-9]{2})([0-9]{2})");
var match = pattern.exec(rawData);
Thank you!