Wierd regex
[email protected] (ToddAndMargo via perl6-users) Mon, 2 Mar 2026 18:28:21 -0800
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
Fedora 43
RakudoPkgFedora43-01.01.x86_64.rpm
This regex does not work:
$NewRev = $RunResult.stdout;
# <meta name="description" content="Download drive 3.56 - Back
up and access your files">
$NewRev ~~ s/ .*? $( Q[Download Icedrive ] ) //;
$NewRev ~~ s/ $( Q[ ] ) .* //;
if $NewRev.chars > 40 { $NewRev = 0; }
Way to many characters.
But this does:
$NewRev = $RunResult.stdout;
# <meta name="description" content="Download drive 3.56 - Back
up and access your files">
sleep .2;
$NewRev ~~ s/ .*? $( Q[Download drive ] ) //;
sleep .2;
$NewRev ~~ s/ $( Q[ ] ) .* //;
sleep .2;
if $NewRev.chars > 40 { $NewRev = 0; }
The sleep statements were originally debugging print statements.
The above worked when the print statement were active but
not when I commented them out. So I substituted sleep for
print and it still worked.
What the ....
Yours in Confusion,
-T