Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
PaySafeCard (PSC) Code
Open Workspace
PCRE (Legacy)
Match
Created 2016-08-03 19:11
2
Regular Expression
/
(
0
[
0
-
9
]
{3}
(
\-
|)
[
0
-
9
]
{4}
(
\-
|)
[
0
-
9
]
{4}
(
\-
|)
[
0
-
9
]
{4}
)
/
Description
Matches codes with and without minus (-) Prevents fake codes like "1234-1234-1234-1234"
Submitted by
timmyrs