This is from my keeper on "match". It is the Perl 5 way
of explaining things. It works really well for me.
How did I do?
To find a match of "any" of the following
my $x="abc2def"; say so $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / )
my $x="abc2def"; say so $x.match( / ^ <+[0..9] + [a..z]> **
On 12/11/23 16:11, William Michels via perl6-users wrote:
On Dec 11, 2023, at 15:54, ToddAndMargo via perl6-users
wrote:
On 12/11/23 15:48, William Michels via perl6-users wrote:
On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users
wrote:
Is there a list somewhere of all the shortc
> On Dec 11, 2023, at 15:54, ToddAndMargo via perl6-users
> wrote:
>
> On 12/11/23 15:48, William Michels via perl6-users wrote:
>>> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users
>>> wrote:
>>>
>
> Is there a list somewhere of all the shortcuts, such as "alnum"?
> --
https://do
On 12/11/23 15:48, William Michels via perl6-users wrote:
On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users
wrote:
On 12/10/23 22:26, William Michels via perl6-users wrote:
Hi Bill,
Yes it does help. I am slowly getting there.
If I do not know the length of the sting and have to as
On 12/11/23 15:48, William Michels via perl6-users wrote:
On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users
wrote:
On 12/10/23 22:26, William Michels via perl6-users wrote:
Hi Bill,
Yes it does help. I am slowly getting there.
If I do not know the length of the sting and have to as
> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users
> wrote:
>
> On 12/10/23 22:26, William Michels via perl6-users wrote:
>
> Hi Bill,
> Yes it does help. I am slowly getting there.
>
> If I do not know the length of the sting and have to ask
> with .chars, is there a way to use a va
On 12/11/23 13:39, ToddAndMargo via perl6-users wrote:
On 12/11/23 00:55, Kevin Pye wrote:
Seriously Todd? "What is a digit?" The characters '0' to '9' are digits.
(Unicode probably has a whole lot of others, but those will do for the
moment.)
Yes seriously. Does '9' have the ascii value of
On 12/11/23 00:55, Kevin Pye wrote:
Seriously Todd? "What is a digit?" The characters '0' to '9' are digits.
(Unicode probably has a whole lot of others, but those will do for the
moment.)
Yes seriously. Does '9' have the ascii value of 57 or the
binary value of 9? Or do you mean a single c
Seriously Todd? "What is a digit?" The characters '0' to '9' are digits.
(Unicode probably has a whole lot of others, but those will do for the moment.)
On Mon, 11 Dec 2023, at 18:22, ToddAndMargo via perl6-users wrote:
> On 12/10/23 22:26, William Michels via perl6-users wrote:
> If I do not kn
On 12/10/23 22:26, William Michels via perl6-users wrote:
Inline:
On Dec 10, 2023, at 12:25, ToddAndMargo via perl6-users
wrote:
On 12/9/23 22:49, William Michels via perl6-users wrote:
f $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) { do something...};
What is the difference between
<
Inline:
> On Dec 10, 2023, at 12:25, ToddAndMargo via perl6-users
> wrote:
>
> On 12/9/23 22:49, William Michels via perl6-users wrote:
>> f $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) { do something...};
>
>
> What is the difference between
>
><+[0..9]
> and
> <[0..9]
>
Nothing, atm
On 12/10/23 19:52, Kevin Pye wrote:
On Mon, 11 Dec 2023, at 09:24, ToddAndMargo via perl6-users wrote:
On 12/10/23 14:16, Kevin Pye wrote:
Because you asked for a match with a string consisting entirely of exactly 8
digits.
I am not following. :'(
^beginning of string
<[0..9]> a
On Mon, 11 Dec 2023, at 09:24, ToddAndMargo via perl6-users wrote:
> On 12/10/23 14:16, Kevin Pye wrote:
>> Because you asked for a match with a string consisting entirely of exactly 8
>> digits.
> I am not following. :'(
^beginning of string
<[0..9]> a digit
** 8 repeated exactly eig
On 12/10/23 14:16, Kevin Pye wrote:
On Mon, 11 Dec 2023, at 07:31, ToddAndMargo via perl6-users wrote:
[0] > my Str $x="abc3defg"; if $x.match( / ^ <[0..9]> ** 8 $ / ) { print
"True\n"; } else { print "False\n" };
False
"3" is in the string. Why False?
Because you asked for a match with a
On Mon, 11 Dec 2023, at 07:31, ToddAndMargo via perl6-users wrote:
> [0] > my Str $x="abc3defg"; if $x.match( / ^ <[0..9]> ** 8 $ / ) { print
> "True\n"; } else { print "False\n" };
> False
>
> "3" is in the string. Why False?
Because you asked for a match with a string consisting entirely o
On 12/10/23 12:25, ToddAndMargo via perl6-users wrote:
On 12/9/23 22:49, William Michels via perl6-users wrote:
f $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) { do something...};
What is the difference between
<+[0..9]
and
<[0..9]
And
/ ^ <+[0..9] + [a..z]> ** 7 $ /
does this
On 12/9/23 22:49, William Michels via perl6-users wrote:
f $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) { do something...};
What is the difference between
<+[0..9]
and
<[0..9]
And
/ ^ <+[0..9] + [a..z]> ** 7 $ /
does this mean that both [0..9] AND [a..z] have to
be present. In o
On 12/9/23 22:49, William Michels via perl6-users wrote:
On Dec 9, 2023, at 22:12, ToddAndMargo via perl6-users
wrote:
On 12/9/23 21:32, ToddAndMargo via perl6-users wrote:
On 12/9/23 19:42, William Michels via perl6-users wrote:
On 12/9/23 17:44, Tom Browder wrote:
> Try: say so $=
> On Dec 9, 2023, at 22:12, ToddAndMargo via perl6-users
> wrote:
>
> On 12/9/23 21:32, ToddAndMargo via perl6-users wrote:
>> On 12/9/23 19:42, William Michels via perl6-users wrote:
>>>
On 12/9/23 17:44, Tom Browder wrote:
> Try: say so $=
>
Would you give me a
On 12/9/23 21:32, ToddAndMargo via perl6-users wrote:
On 12/9/23 19:42, William Michels via perl6-users wrote:
On 12/9/23 17:44, Tom Browder wrote:
> Try: say so $=
>
Would you give me a quick example?
Hi Todd!
In the Raku REPL (MoarVM 2023.05):
[0] > my $x="abc2def"; say $x ~~ / ^
On 12/9/23 19:42, William Michels via perl6-users wrote:
On 12/9/23 17:44, Tom Browder wrote:
> Try: say so $=
>
Would you give me a quick example?
Hi Todd!
In the Raku REPL (MoarVM 2023.05):
[0] > my $x="abc2def"; say $x ~~ / ^ ** 7 $ /;
「abc2def」
alnum => 「a」
alnum => 「b」
aln
> On 12/9/23 17:44, Tom Browder wrote:
> > Try: say so $=
> >
>
> Would you give me a quick example?
Hi Todd!
In the Raku REPL (MoarVM 2023.05):
[0] > my $x="abc2def"; say $x ~~ / ^ ** 7 $ /;
「abc2def」
alnum => 「a」
alnum => 「b」
alnum => 「c」
alnum => 「2」
alnum => 「d」
alnum => 「e」
a
On Sat, Dec 9, 2023 at 18:22 ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
What am I doing wrong here?
my $x="abc2def"; say $x=/ ^ <[0..9]> ** 7 $ /;
/ ^ <[0..9]> ** 7 $ /
[0] > my $x="abc2def"; say $x=/ ^ <[l..z]> ** 7 $ /;
/ ^ <[l..z
Try: say so $=
On Sat, Dec 9, 2023 at 18:22 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> What am I doing wrong here?
>
>
> my $x="abc2def"; say $x=/ ^ <[0..9]> ** 7 $ /;
> / ^ <[0..9]> ** 7 $ /
>
> [0] > my $x="abc2def"; say $x=/ ^ <[l..z]> ** 7 $ /;
> / ^ <[l..
Hi All,
What am I doing wrong here?
my $x="abc2def"; say $x=/ ^ <[0..9]> ** 7 $ /;
/ ^ <[0..9]> ** 7 $ /
[0] > my $x="abc2def"; say $x=/ ^ <[l..z]> ** 7 $ /;
/ ^ <[l..z]> ** 7 $ /
[0] > my $x="abc2def"; say $x~~/ ^ <[0..9]> ** 7 $ /;
Nil
[0] > my $x="abc2def"; say $x~~/ ^ <[l..z]>
25 matches
Mail list logo