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
/
(<text.*?<\/text>)
/
g
Input 1
var svgstring = '<g font-size="1.6" font-family="DejaVu Sans" stroke="none" fill="#000000"><rect x="254.01" y="50.00" width="29" height="2.24" stroke="#053581" stroke-width="0.1" fill="#b2b8c3"></rect><text x="254.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Cav.</text><text x="259.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Wire</text><text x="267.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Colour</text><text x="274.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Gauge</text><rect x="254.01" y="52.24" width="29" height="2.24" stroke="#053581" stroke-width="0.1" fill="#ffffff"></rect><text x="254.21" y="53.84" fill="#000000"> 1</text><text x="259.21" y="53.84" fill="#000000"> FPTO-20..</text><rect x="267.01" y="52.34" width="7" height="2.04" stroke-width="0.0
Substitution
var svgstring = '<g font-size="1.6" font-family="DejaVu Sans" stroke="none" fill="#000000"><rect x="254.01" y="50.00" width="29" height="2.24" stroke="#053581" stroke-width="0.1" fill="#b2b8c3"></rect><text x="254.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Cav.</text><text x="259.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Wire</text><text x="267.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Colour</text><text x="274.21" y="51.6" font-size="1.6" font-weight="700" font-family="DejaVu Sans" stroke="none" fill="#000000">Gauge</text><rect x="254.01" y="52.24" width="29" height="2.24" stroke="#053581" stroke-width="0.1" fill="#ffffff"></rect><text x="254.21" y="53.84" fill="#000000"> 1</text><text x="259.21" y="53.84" fill="#000000"> FPTO-20..</text><rect x="267.01" y="52.34" width="7" height="2.04" stroke-width="0.0