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
Match instagram URLs
Open Workspace
PCRE2 (PHP)
Match
Created 2026-01-13 23:29
1
Regular Expression
/
https
?
:
\/\/
(?:
www
\.
)?
instagram
\.
com
\/
(?:
(?:
(
(?:
reels
)
|
p
)
\/
(
\w
+
)
)
|
(
(
stories
)
\/
(
\w
+
)
\/
\d
+
)
)
/
gm
Description
Matches instagram urls for posts, reels, and stories
works on all flavors except rust
Submitted by
User9684