Re: How to cut up a long line

2025-01-11 Thread William Michels via perl6-users
I was using an older version of Rakudo (2023.05). 
With a newer version Rakudo (2024.09-01) you now have to `>>.Str` hyper or 
`.map(*.Str)` map to a string.
(I've also added a call to `@AltArray.elems.say`, at the end):

~$  
/Users/admin/rakudo/rakudo-2024.09/rakudo-moar-2024.09-01-macos-arm64-clang/bin/raku
 -e '  \
   my Str $AltClickHere = lines[0];  \
   my @AltArray = ($AltClickHere ~~ m:g/  .*?  | 
\h+ > /)>>.Str;   \
   .put for @AltArray; @AltArray.elems.say'  todd_test.txt
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'
3
~$  
/Users/admin/rakudo/rakudo-2024.09/rakudo-moar-2024.09-01-macos-arm64-clang/bin/raku
 -e '  \
   my Str $AltClickHere = lines[0];  \
   my @AltArray = $AltClickHere.match(:global, /  .*? 
 | \h+ > /)>>.Str;   \
   .put for @AltArray; @AltArray.elems.say'  todd_test.txt
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'
3
~$  
/Users/admin/rakudo/rakudo-2024.09/rakudo-moar-2024.09-01-macos-arm64-clang/bin/raku
 -e '  \
   my Str $AltClickHere = lines[0];  my @AltArray; \
   @AltArray.push: $_ for $AltClickHere.match(:global, /  
.*?  | \h+ > /)>>.Str;   \
   .put for @AltArray; @AltArray.elems.say'  todd_test.txt
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'
3


HTH, Bill.


> On Jan 11, 2025, at 02:22, ToddAndMargo via perl6-users 
>  wrote:
> 
> On 1/11/25 2:20 AM, ToddAndMargo via perl6-users wrote:
>> On 1/11/25 2:17 AM, ToddAndMargo wrote:
>>> On 1/10/25 9:35 PM, ToddAndMargo wrote:
 
> 
>> On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users > [email protected]> wrote:
>> 
>> Hi All,
>> 
>> I am scratching my head trying to figure out how to cut
>> up this long line;
>> 
>> 
>> download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>> class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2> class="data upper size fs-0-7">Size: 
>> 80.26MBLast modified: Tue. January 
>> 7th, 2025 - 10:54pm> 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'>> class="name">betterbird-128.6.0esr- 
>> bb20.en-US.linux- x86_64.tar.bz2Size: 80.04MB> class="bold">Last modified: Tue. January 7th, 2025 - 10:42pm> div>> download='betterbird-128.6.0esr- bb20.es-AR.linux- x86_64.tar.bz2'>> class="img bz2">betterbird-128.6.0esr- bb20.es-AR.linux- x86_64.tar.bz2
>> 
>> 
>> What I want to come out of it is an array of stings starting
>> at "download" and ending at ">" or "<"
>> 
>> 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'x86_64.tar.bz2
>> 
>> 
>> Many thanks,
>> -T
 
 On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
  > Hi Todd,
  >
  > ~$ raku -ne 'put $/.join("\n") if m:g/  .*? >>>  > \> | \h+ > /;'  todd_test.txt
  > 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'
  >
  > See: https://docs.raku.org/syntax/%24%2F  %24%2F>
  > See: https://docs.raku.org/language/regexes#Lookahead_assertions
  > 
  >
  > OR:
  >
  > ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
  > \h+ ] /;'  todd_test.txt
  > 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'
  >
  > See: https://docs.raku.org/language/ regexes#Capture_markers:_%3C(_)%3E
  > 
  >
  > Let me know if this is part of a larger script, how you're obtaining the
  > input line(s), etc., if you need more guidance.
  >
  > HTH,
  >
  > Bill.
  >
 
 Hi Bill,
 
 Thank you!
 
 I will not have the time to do any programming till maybe
 Sunday, so I will not have a chance till then to test
 this out.
 
 Yes, this is a simplification of a much larger program.
 The line in question is
 
 line 379
 

Re: How to cut up a long line

2025-01-11 Thread ToddAndMargo via perl6-users

On 1/11/25 2:20 AM, ToddAndMargo via perl6-users wrote:

On 1/11/25 2:17 AM, ToddAndMargo wrote:

On 1/10/25 9:35 PM, ToddAndMargo wrote:




On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users [email protected]> wrote:


Hi All,

I am scratching my head trying to figure out how to cut
up this long line;


download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2class="data upper size fs-0-7">Size: 
80.26MBLast modified: 
Tue. January 7th, 2025 - 10:54pmclass="block">download='betterbird-128.6.0esr-bb20.en- US.linux- 
x86_64.tar.bz2'>class="file fs-1-2 bold">betterbird-128.6.0esr- bb20.en-US.linux- 
x86_64.tar.bz2class="bold">Size: 80.04MBspan>class="bold">Last modified: Tue. January 7th, 2025 - 
10:42pmhref="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'>class="name">betterbird-128.6.0esr- 
bb20.es-AR.linux- x86_64.tar.bz2



What I want to come out of it is an array of stings starting
at "download" and ending at ">" or "<"

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'x86_64.tar.bz2



Many thanks,
-T


On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
 > Hi Todd,
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/  .*? before

 > \> | \h+ > /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/syntax/%24%2F  %24%2F>
 > See: https://docs.raku.org/language/regexes#Lookahead_assertions
 > 
 >
 > OR:
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
 > \h+ ] /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/language/ 
regexes#Capture_markers:_%3C(_)%3E

 > 
 >
 > Let me know if this is part of a larger script, how you're 
obtaining the

 > input line(s), etc., if you need more guidance.
 >
 > HTH,
 >
 > Bill.
 >

Hi Bill,

Thank you!

I will not have the time to do any programming till maybe
Sunday, so I will not have a chance till then to test
this out.

Yes, this is a simplification of a much larger program.
The line in question is

line 379
view-source:https://www.betterbird.eu/downloads/index.php

The YUGE run on line.  (I hate when they do that.)

I am having a problem figuring out how to get your example
into an array of strings.

The long line will reside in
    my Str $AltClickHere;

And the resulting array will reside in
    my @AltArray

Would you mind showing me how to do that whilst I wait
for some free time?

Many thanks,
-T


    my Str $AltClickHere  = "";
    my @AltArray;

@AltArray = $AltClickHere ~~ m:g/  .*? \> | \h+ > /;  .put for @AltArray;


Type check failed for an element of @AltArray; expected Str but got 
Match (Match.new(:orig("dow...)



I tool out the "Str" from my array declaration .    Now I
am getting


Too many positionals passed; expected 1 argument but got 2




Got it!

I took out the .put

 @AltArray = $AltClickHere ~~ m:g/  .*? \> | \h+ > /;  # .put for @AltArray;


Thank you
-T




Re: How to cut up a long line

2025-01-11 Thread ToddAndMargo via perl6-users

On 1/11/25 2:17 AM, ToddAndMargo wrote:

On 1/10/25 9:35 PM, ToddAndMargo wrote:




On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users [email protected]> wrote:


Hi All,

I am scratching my head trying to figure out how to cut
up this long line;


download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2class="data upper size fs-0-7">Size: 
80.26MBLast modified: Tue. 
January 7th, 2025 - 10:54pmclass="block">download='betterbird-128.6.0esr-bb20.en- US.linux- 
x86_64.tar.bz2'>class="file fs-1-2 bold">betterbird-128.6.0esr- bb20.en-US.linux- 
x86_64.tar.bz2class="bold">Size: 80.04MBdiv>Last 
modified: Tue. January 7th, 2025 - 10:42pmdiv>download='betterbird-128.6.0esr-bb20.es-AR.linux- 
x86_64.tar.bz2'>class="file fs-1-2 bold">betterbird-128.6.0esr-bb20.es-AR.linux- 
x86_64.tar.bz2



What I want to come out of it is an array of stings starting
at "download" and ending at ">" or "<"

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'x86_64.tar.bz2



Many thanks,
-T


On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
 > Hi Todd,
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/  .*? before

 > \> | \h+ > /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/syntax/%24%2F  %24%2F>
 > See: https://docs.raku.org/language/regexes#Lookahead_assertions
 > 
 >
 > OR:
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
 > \h+ ] /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/language/regexes#Capture_markers:_%3C(_)%3E
 > 
 >
 > Let me know if this is part of a larger script, how you're 
obtaining the

 > input line(s), etc., if you need more guidance.
 >
 > HTH,
 >
 > Bill.
 >

Hi Bill,

Thank you!

I will not have the time to do any programming till maybe
Sunday, so I will not have a chance till then to test
this out.

Yes, this is a simplification of a much larger program.
The line in question is

line 379
view-source:https://www.betterbird.eu/downloads/index.php

The YUGE run on line.  (I hate when they do that.)

I am having a problem figuring out how to get your example
into an array of strings.

The long line will reside in
    my Str $AltClickHere;

And the resulting array will reside in
    my @AltArray

Would you mind showing me how to do that whilst I wait
for some free time?

Many thanks,
-T


    my Str $AltClickHere  = "";
    my @AltArray;

@AltArray = $AltClickHere ~~ m:g/  .*? \> | \h+ > /;  .put for @AltArray;


Type check failed for an element of @AltArray; expected Str but got 
Match (Match.new(:orig("dow...)



I tool out the "Str" from my array declaration .Now I
am getting


Too many positionals passed; expected 1 argument but got 2



Re: How to cut up a long line

2025-01-11 Thread ToddAndMargo via perl6-users

On 1/10/25 9:35 PM, ToddAndMargo wrote:




On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users [email protected]> wrote:


Hi All,

I am scratching my head trying to figure out how to cut
up this long line;


download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2class="data upper size fs-0-7">Size: 
80.26MBLast modified: Tue. 
January 7th, 2025 - 10:54pmclass="block">download='betterbird-128.6.0esr-bb20.en- US.linux- 
x86_64.tar.bz2'>class="file fs-1-2 bold">betterbird-128.6.0esr- bb20.en-US.linux- 
x86_64.tar.bz2class="bold">Size: 80.04MBdiv>Last 
modified: Tue. January 7th, 2025 - 10:42pmdiv>download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2



What I want to come out of it is an array of stings starting
at "download" and ending at ">" or "<"

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'x86_64.tar.bz2



Many thanks,
-T


On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
 > Hi Todd,
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/  .*?  \> | \h+ > /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/syntax/%24%2F  %24%2F>
 > See: https://docs.raku.org/language/regexes#Lookahead_assertions
 > 
 >
 > OR:
 >
 > ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
 > \h+ ] /;'  todd_test.txt
 > 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'
 >
 > See: https://docs.raku.org/language/regexes#Capture_markers:_%3C(_)%3E
 > 
 >
 > Let me know if this is part of a larger script, how you're obtaining the
 > input line(s), etc., if you need more guidance.
 >
 > HTH,
 >
 > Bill.
 >

Hi Bill,

Thank you!

I will not have the time to do any programming till maybe
Sunday, so I will not have a chance till then to test
this out.

Yes, this is a simplification of a much larger program.
The line in question is

line 379
view-source:https://www.betterbird.eu/downloads/index.php

The YUGE run on line.  (I hate when they do that.)

I am having a problem figuring out how to get your example
into an array of strings.

The long line will reside in
    my Str $AltClickHere;

And the resulting array will reside in
    my @AltArray

Would you mind showing me how to do that whilst I wait
for some free time?

Many thanks,
-T


   my Str $AltClickHere  = "";
   my @AltArray;

@AltArray = $AltClickHere ~~ m:g/  .*? \> | \h+ > /;  .put for @AltArray;


Type check failed for an element of @AltArray; expected Str but got 
Match (Match.new(:orig("dow...)


Re: How to cut up a long line

2025-01-10 Thread William Michels via perl6-users
~$ raku -e '  \ 
   my Str $AltClickHere = lines[0];  \
   my @AltArray = $AltClickHere ~~ m:g/  .*?  
| \h+ > /;   \
   .put for @AltArray;'   todd_test.txt
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'

OR maybe:

~$ raku -e '  \
   my Str $AltClickHere = lines[0];  \ 
   my @AltArray = $AltClickHere.match(:global, /  .*? 
 | \h+ > /);  \ 
   .put for @AltArray;' todd_test.txt
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'

OR even:

~$ raku -e '  \
   my Str $AltClickHere = lines[0]; my @AltArray;  \
   @AltArray.push: $_ for $AltClickHere.match(:global, /  .*?  | \h+ > /);   \
   .put for @AltArray;'  todd_test.txt
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'

HTH, Bill.

> On Jan 10, 2025, at 21:35, ToddAndMargo via perl6-users 
>  wrote:
> 
> 
>>> On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users >> [email protected]> wrote:
>>> 
>>> Hi All,
>>> 
>>> I am scratching my head trying to figure out how to cut
>>> up this long line;
>>> 
>>> 
>>> download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>>> class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2>> class="data upper size fs-0-7">Size: 80.26>> class="fs-0-8 bold">MBLast modified: Tue. January 7th, 2025 - 
>>> 10:54pm>> 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'>>> class="file fs-1-2 bold">betterbird-128.6.0esr- 
>>> bb20.en-US.linux-x86_64.tar.bz2Size: 80.04MB>> class="bold">Last modified: Tue. January 7th, 2025 - 10:42pm>> div>>> download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'>>> class="img bz2">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2
>>> 
>>> 
>>> What I want to come out of it is an array of stings starting
>>> at "download" and ending at ">" or "<"
>>> 
>>> 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'x86_64.tar.bz2
>>> 
>>> 
>>> Many thanks,
>>> -T
> 
> On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
> > Hi Todd,
> >
> > ~$ raku -ne 'put $/.join("\n") if m:g/  .*?  > \> | \h+ > /;'  todd_test.txt
> > 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'
> >
> > See: https://docs.raku.org/syntax/%24%2F  > %24%2F>
> > See: https://docs.raku.org/language/regexes#Lookahead_assertions
> > 
> >
> > OR:
> >
> > ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
> > \h+ ] /;'  todd_test.txt
> > 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'
> >
> > See: https://docs.raku.org/language/regexes#Capture_markers:_%3C(_)%3E
> > 
> >
> > Let me know if this is part of a larger script, how you're obtaining the
> > input line(s), etc., if you need more guidance.
> >
> > HTH,
> >
> > Bill.
> >
> 
> Hi Bill,
> 
> Thank you!
> 
> I will not have the time to do any programming till maybe
> Sunday, so I will not have a chance till then to test
> this out.
> 
> Yes, this is a simplification of a much larger program.
> The line in question is
> 
> line 379
> view-source:https://www.betterbird.eu/downloads/index.php
> 
> The YUGE run on line.  (I hate when they do that.)
> 
> I am having a problem figuring out how to get your example
> into an array of strings.
> 
> The long line will reside in
>   my Str $AltClickHere;
> 
> And the resulting array will reside in
>   my @AltArray
> 
> Would you mind showing me how to do that whilst I wait
> for some free time?
> 
> Many thanks,
> -T
> 
> 
> 



Re: How to cut up a long line

2025-01-10 Thread ToddAndMargo via perl6-users





On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users [email protected]> wrote:


Hi All,

I am scratching my head trying to figure out how to cut
up this long line;


download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2class="data upper size fs-0-7">Size: 
80.26MBLast modified: Tue. January 
7th, 2025 - 10:54pmhref="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'>class="name">betterbird-128.6.0esr- 
bb20.en-US.linux-x86_64.tar.bz2Size: 80.04MBclass="bold">Last modified: Tue. January 7th, 2025 - 10:42pmdiv>download='betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2'>class="img bz2">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2



What I want to come out of it is an array of stings starting
at "download" and ending at ">" or "<"

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'x86_64.tar.bz2



Many thanks,
-T


On 1/10/25 8:59 PM, William Michels via perl6-users wrote:
> Hi Todd,
>
> ~$ raku -ne 'put $/.join("\n") if m:g/  .*?  \> | \h+ > /;'  todd_test.txt
> 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'
>
> See: https://docs.raku.org/syntax/%24%2F  %24%2F>
> See: https://docs.raku.org/language/regexes#Lookahead_assertions
> 
>
> OR:
>
> ~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> |
> \h+ ] /;'  todd_test.txt
> 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'
>
> See: https://docs.raku.org/language/regexes#Capture_markers:_%3C(_)%3E
> 
>
> Let me know if this is part of a larger script, how you're obtaining the
> input line(s), etc., if you need more guidance.
>
> HTH,
>
> Bill.
>

Hi Bill,

Thank you!

I will not have the time to do any programming till maybe
Sunday, so I will not have a chance till then to test
this out.

Yes, this is a simplification of a much larger program.
The line in question is

line 379
view-source:https://www.betterbird.eu/downloads/index.php

The YUGE run on line.  (I hate when they do that.)

I am having a problem figuring out how to get your example
into an array of strings.

The long line will reside in
   my Str $AltClickHere;

And the resulting array will reside in
   my @AltArray

Would you mind showing me how to do that whilst I wait
for some free time?

Many thanks,
-T





Re: How to cut up a long line

2025-01-10 Thread William Michels via perl6-users
Hi Todd,

~$ raku -ne 'put $/.join("\n") if m:g/  .*?  | 
\h+ > /;'  todd_test.txt
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'

See: https://docs.raku.org/syntax/%24%2F
See: https://docs.raku.org/language/regexes#Lookahead_assertions

OR:

~$ raku -ne 'put $/.join("\n") if m:g/ <( download  .*? )> [ \> | \h+ ] /;'  
todd_test.txt
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'

See: https://docs.raku.org/language/regexes#Capture_markers:_%3C(_)%3E

Let me know if this is part of a larger script, how you're obtaining the input 
line(s), etc., if you need more guidance.

HTH, 

Bill.


> On Jan 10, 2025, at 17:50, ToddAndMargo via perl6-users 
>  wrote:
> 
> Hi All,
> 
> I am scratching my head trying to figure out how to cut
> up this long line;
> 
> 
> download='betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2'> class="img bz2">   betterbird-128.6.0esr-bb20.de.linux-x86_64.tar.bz2 
>  Size: 
> 80.26MB  Last modified: Tue. January 
> 7th, 2025 - 10:54pm  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'> 
>   class="file fs-1-2 
> bold">betterbird-128.6.0esr-bb20.en-US.linux-x86_64.tar.bz2 
>   Size: 
> 80.04MB  Last modified: Tue. January 
> 7th, 2025 - 10:42pmhref="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'> 
> class="file fs-1-2 
> bold">betterbird-128.6.0esr-bb20.es-AR.linux-x86_64.tar.bz2   
> 
> 
> What I want to come out of it is an array of stings starting
> at "download" and ending at ">" or "<"
> 
> 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'x86_64.tar.bz2
> 
> 
> Many thanks,
> -T
>