-4

What is Regular Expression for 16 digits virtual visa cards with dash.
For example :

1234-5678-9123-4567

SilverLight
  • 19,668
  • 65
  • 192
  • 300

1 Answers1

2

According to regular-expressions.info the Visa regex is

^4[0-9]{12}(?:[0-9]{3})?$ 

see the link for other card providers.

UPDATE

For the 16-character number with dashes:

^4[0-9]{3}(?:-[0-9]{4}){3}$
SnowGroomer
  • 695
  • 5
  • 14