Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
\/(?=.*[a|b|d])[a-z]{3,4}[\d]\/
/
gm
Input 1
New
http://example.com/folder/aaaa/ - no match (no digit at end) http://example.com/folder/bbb1/ - match (has at least one "b", and digit) http://example.com/folder/ccc1/ - no match (has neither "a", "b" or "d") http://example.com/folder/yyd3/ - match (has at least one "d", and digit) http://example.com/folder/yydd3/ - match (has at least one "d", and digit) http://example.com/folder/yyddd3/ - no match (too long)
Substitution
http://example.com/folder/aaaa/ - no match (no digit at end) http://example.com/folder/bbb1/ - match (has at least one "b", and digit) http://example.com/folder/ccc1/ - no match (has neither "a", "b" or "d") http://example.com/folder/yyd3/ - match (has at least one "d", and digit) http://example.com/folder/yydd3/ - match (has at least one "d", and digit) http://example.com/folder/yyddd3/ - no match (too long)