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
/
<form[^>]*name="loginForm"[^>]*>[^~]*?<\/form>
/
gm
Input 1
<html> <body> <form method = "post" name="loginForm" > <input type="text" name="firstName"/> <input type="text" name="lastName"/> </form> <form method = "post" name="signupForm" > <input type="text" name="userName"/> </form> </body> </html>
Substitution
<html> <body> <form method = "post" name="loginForm" > <input type="text" name="firstName"/> <input type="text" name="lastName"/> </form> <form method = "post" name="signupForm" > <input type="text" name="userName"/> </form> </body> </html>