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
/
<div class="panel-body">([^]*?)(<\/div>|$)
/
gi
Input 1
1
New
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Webmin 1.851 on centos.centos (CentOS Linux 7.3.1611)</title> </head> <body> <div> <div> <div class="panel-body"> <a href="#">Link</a> Line 1 Line 2 Line 3 </div> Don't match after closing `div`...but match this and below in case closing `div` is removed. Line below 1 Line below 2 Line below 3
Extraction
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Webmin 1.851 on centos.centos (CentOS Linux 7.3.1611)</title> </head> <body> <div> <div> <div class="panel-body"> <a href="#">Link</a> Line 1 Line 2 Line 3 </div> Don't match after closing `div`...but match this and below in case closing `div` is removed. Line below 1 Line below 2 Line below 3