use strict;
my $str = '<section data-v-7630ac7c="" view-more-component="">
<div data-v-5c5571e4="" table-component="" data-v-7630ac7c="">
<header data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="">Price</div>
<div data-v-5c5571e4="" quantity="" right-align="">Quantity</div>
<div data-v-5c5571e4="" date="">Time</div></header> <section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(142, 201, 25);">8611.00</div>
<div data-v-5c5571e4="" quantity="" right-align="">1.00000000</div>
<div data-v-5c5571e4="" date="">13:27:17</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(142, 201, 25);">8612.30</div>
<div data-v-5c5571e4="" quantity="" right-align="">1.00000000</div>
<div data-v-5c5571e4="" date="">13:03:12</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(255, 42, 104);">8517.70</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.04983464</div>
<div data-v-5c5571e4="" date="">12:51:24</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(142, 201, 25);">8608.70</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.59195657</div>
<div data-v-5c5571e4="" date="">12:32:26</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(255, 42, 104);">8521.70</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.02990000</div>
<div data-v-5c5571e4="" date="">11:29:57</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(142, 201, 25);">8545.20</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.26101049</div>
<div data-v-5c5571e4="" date="">01:20:35</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(255, 42, 104);">8462.30</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.00674370</div>
<div data-v-5c5571e4="" date="">23:49:47</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(142, 201, 25);">8539.30</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.05799985</div>
<div data-v-5c5571e4="" date="">23:00:53</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(255, 42, 104);">8446.00</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.02345439</div>
<div data-v-5c5571e4="" date="">22:30:43</div></section><section data-v-5c5571e4="">
<div data-v-5c5571e4="" price="" right-align="" style="color: rgb(255, 42, 104);">8540.00</div>
<div data-v-5c5571e4="" quantity="" right-align="">0.25500001</div>
<div data-v-5c5571e4="" date="">21:55:28</div></section></div>
<section data-v-7630ac7c="" id="my-trades"><div data-v-75ce2ffa="" data-v-7630ac7c="" button-component="" class="viewmore fullbutton">
<button data-v-75ce2ffa=""></button>
<!----> <span data-v-75ce2ffa="" text="">View More</span> <!----></div> <!----></section> <!----> <!----></section> <!---->';
my $regex = qr/<div.*?price.*?>(\d+\.\d+)<\/div>/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html