I came across this regular expression via the site http://www.regular-expressions.info/creditcard.html
I can't seem to understand it:
Specifically, I can't comprehend the part with the '?:'. As far as I'm aware, this wouldn't work because the '?' matches the previous token, which is an opening quote in this case. The colon, by my reasoning, doesn't belong in an expression matching credit cards.
Despite the strange syntax, this appears to work. Anyone have any thoughts on why?