Hi All,
In another post, Bill gave me a wonderful match that took
a ridiculously long line of test and cut out what I wanted
and put it into cells of an array.
@ClickArray = $ClickPage ~~ m:g/ <?before ^ | download > .*? <?before \>
| \h+ > /;
I do not understand what he did.
m:g = match and global
<> = litteral
? what does this do?
^ what does this do?
| what does this do?
\ what does this do
\h+ > what does this do?
Yours in confusion.
-T
In practice:
[0] > my Str
$x=Q{^[[200~download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>
<div class="img bz2"></div> <div class="name"> <div
class="file fs-1-2
bold">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2</div>
<div class="data upper size fs-0-7"><span class="bold">Size:</span>
80.26<span class="fs-0-8 bold">MB</span></div> <div class="data
upper modified fs-0-7"><span class="bold">Last modified:</span> Tue.
January 7th, 2025 - 10:54pm</div> </div></a></div><div
class="block"><a
href="LinuxArchive/betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2"
class="bz2"
download='betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2'>
<div class="img bz2"></div> <div class="name"> <div
class="file fs-1-2
bold">betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2</div>
<div class="data upper size fs-0-7"><span class="bold">Size:</span>
80.04<span class="fs-0-8 bold">MB</span></div> <div class="data
upper modified fs-0-7"><span class="bold">Last modified:</span> Tue.
January 7th, 2025 - 10:42pm</div> </div> </a></div><div
class="block"><a
href="LinuxArchive/betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2"
class="bz2"
download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'>
<div class="img bz2"></div> <div class="name"> <div
class="file fs-1-2
bold">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2</div>}
download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'> <div
class="img bz2"></div> <div class="name"> <div class="file
fs-1-2 bold">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2</div>
<div <class="data upper size fs-0-7"><span
class="bold">Size:</span> 80.26<span class="fs-0-8 bold">MB</span></div>
<div class="data upper modified fs-0-7"><span class="bold">Last
modified:</span> Tue. January 7th, 2025 - 10:54pm</div>
</div></a></div><div class="block"><a
href="LinuxArchive/betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2"
class="bz2"
download='betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2'>
<div class="img bz2"></div> <div class="name"> <div
class="file fs-1-2
bold">betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2</div>
<div class="data upper size fs-0-7"><span class="bold">Size:</span>
80.04<span class="fs-0-8 bold">MB</span></div> <div class="data
upper modified fs-0-7"><span class="bold">Last modified:</span> Tue.
January 7th, 2025 - 10:42pm</div> </div> </a></div><div
class="block"><a
href="LinuxArchive/betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2"
class="bz2"
download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'>
<div class="img bz2"></div> <div class="name"> <div
class="file fs-1-2
bold">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2</div>
[1] > my @y = $x ~~ m:g/ <?before ^ | download > .*? <?before \> | \h+ > /;
[「download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'」
「download='betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2'」
「download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'」]
[2] > for @y -> $Line { print $Line ~ "\n"; }
download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'
download='betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2'
download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'