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
potential react or next component names from folder name
Open Workspace
PCRE2 (PHP)
Match
Created 2024-04-14 04:41
1
Regular Expression
/
^
(?:
(?<caml>
\w
+
(?:
\-
\w
+
)+
)
|
\[
(?<with>
[
a
-
z
\d
-
]
+
)(?<qualify>
.
+
)
\]
|
\[
{1,2}
\.
{3}
(?<all>
[
\w
\-
]
+
)
\]
{1,2}
|
\(
(?<group>
[
\w
\-
]
+
)
\)
|
(?<reserved>
[
@_
]
[
\w
\-
]
+
)
|
(?<same>
\.
)
|
(?:
(?<subpath>
(?:
(?:
[
\/\\
]
[^
\/\\
]
+
)+
[
\/\\
]
)
|
[
\/\\
]
)(?<nested>
[^
\\\/
]
+
)
)
)
$
/
m
Description
this regex can be used to generate a potential component name out of a folder name NEXT js complient
Submitted by
Jean Luc Emmanuel VERHANNEMAN