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
/
(?(DEFINE) (?<groupStart> <g ) (?<groupAttrs> >|[^>]+> ) (?<groupStartContainer> (?:(?&groupStart)(?&groupAttrs)(?&space)){1,} ) (?<groupEnd> (?:<\/g>(?&space)){1,} ) (?<group> (?:(?&groupStartContainer)(?&tags)){1,}(?&groupEnd)(?:(?&space)(?&tags)(?&groupEnd))? ) (?<tags> (?:<[^>]+\/>(?&space)){1,} ) (?<space> (?:\s+)? ) ) (?<groupeSimples> (?&group) )
/
gx
Input 1
<g id="Tie2"> <path fill="#402A23" d="M21,2.307c0,1.809,0,3.016,0,3.016s0.057,1.809-1.752,1.809l0.178,0.682l-5.027,5.042l1.342-5.723 c0,0-1.741,0-1.741-1.809c0-1.809,0-3.016,0-3.016S13.876,1,15.686,1s3.618,0,3.618,0S21,0.498,21,2.307z"/> <polygon fill="#402A23" points="20.993,14.717 12.001,23.709 13.684,16.14 19.919,9.905 "/> <polygon fill="#402A23" points="22.855,23.106 14.305,31.657 10.861,28.841 11.271,26.996 21.457,16.81 "/> <polygon fill="#402A23" points="24.128,28.841 17.495,34.269 15.709,32.809 23.32,25.198 "/> </g> <path id="TV" fill="#402A23" d="M32.154,8.083H17.152l4.972-5.813l-1.649-1.406l-5.688,6.633L9.098,0.863L7.447,2.27l4.972,5.813 c-5.297,0-9.574,0-9.574,0s-2.171,0-2.171,2.171v19.541c0,0,0,2.17,2.171,2.17h3.257v2.172h3.257v-2.172h16.283v2.172h3.257v-2.172 c1.997,0,3.256,0,3.256,0s2.172,0,2.172-2.17V10.254C34.326,10.254,34.326,8.083,32.154,8.083z M23.47,26.538 c0,0,0,2.171-2.171,2.171s-15.197,0-15.197,0s-2.171,0-2.171-2.171c0-2.172,0-13.027,0-13.027s0-2.171,2.171-2.171 s
Extraction
<g id="Tie2"> <path fill="#402A23" d="M21,2.307c0,1.809,0,3.016,0,3.016s0.057,1.809-1.752,1.809l0.178,0.682l-5.027,5.042l1.342-5.723 c0,0-1.741,0-1.741-1.809c0-1.809,0-3.016,0-3.016S13.876,1,15.686,1s3.618,0,3.618,0S21,0.498,21,2.307z"/> <polygon fill="#402A23" points="20.993,14.717 12.001,23.709 13.684,16.14 19.919,9.905 "/> <polygon fill="#402A23" points="22.855,23.106 14.305,31.657 10.861,28.841 11.271,26.996 21.457,16.81 "/> <polygon fill="#402A23" points="24.128,28.841 17.495,34.269 15.709,32.809 23.32,25.198 "/> </g> <path id="TV" fill="#402A23" d="M32.154,8.083H17.152l4.972-5.813l-1.649-1.406l-5.688,6.633L9.098,0.863L7.447,2.27l4.972,5.813 c-5.297,0-9.574,0-9.574,0s-2.171,0-2.171,2.171v19.541c0,0,0,2.17,2.171,2.17h3.257v2.172h3.257v-2.172h16.283v2.172h3.257v-2.172 c1.997,0,3.256,0,3.256,0s2.172,0,2.172-2.17V10.254C34.326,10.254,34.326,8.083,32.154,8.083z M23.47,26.538 c0,0,0,2.171-2.171,2.171s-15.197,0-15.197,0s-2.171,0-2.171-2.171c0-2.172,0-13.027,0-13.027s0-2.171,2.171-2.171 s