I need to verify a credit card (dummy – i’m not doing any transaction in real). The conditions are
-
It has to be between 10 and 16 digits.
-
Start with a digit 3 or 4
-
Only digits are allowed i mean [0-9].
I tried it and mine was [3-4][0-9]{10-16}. But it seems to be not yielding results.
Thank you in anticipation
Should be:
[34]one of the characters.[3-4]is the same.{9,15}is the proper syntax. Note that[34]is the first digit, so you need to subtract one.Some Examples: http://www.rubular.com/r/q61cPPYW7E