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
Validate PHP DateInterval Format
Open Workspace
PCRE (Legacy)
Match
Created 2016-09-08 16:04
1
Regular Expression
/
(
P
(
[
1
-
9
]
|
[
1
-
9
]
[
0
-
9
]
)(
W
|
D
|
M
|
H
)
|
PT
(
[
1
-
9
]
|
[
1
-
9
]
[
0
-
9
]
)
H
)
/
Description
Checks if string is valid DateInterval format
Submitted by
grambas