I am struggling to find and come up with a regex that disallows inconsistent symbols in credit cards.
\d{4}[\s\-]*\d{4}[\s\-]*\d{4}[\s\-]*\d{4}
For example, the Regex above allows for the below to pass. The last one is problematic as it contains '-' and ' ' and ''. How do I come up with a regex that requires all the symbols ('-' or ' ' or '') to be consistently the same? i.e. only allow the first 3 but not the last statement.
1234123412341234, 1234-1234-1234-1234, 1234 1234 1234 1234, 1234-12341234 1234