Re: number of letters question

2018-05-16 Thread Timo Paulssen
That is absolutely correct, thanks!

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 10:05 AM, Larry Wall wrote: On Tue, May 15, 2018 at 12:44:12AM -0700, ToddAndMargo wrote: : "abcrd-12.3.4" would be five letters, six numbers, and one : I don't care. Here's another approach: $ p6 '"abcrd-12.3.4".comb.classify(*.uniprop).say' {Ll => [a b c r d], Nd =>

Re: number of letters question

2018-05-15 Thread Andy Bach
> though from the problem question it sounds a lot more like what todd wants is my $input = "abcrd-12.3.4"; my $letters = $input.comb(/<[a..z]>/); my $numbers = $input.comb(/<[a..z 0..9 .]>/); say "the string $input has $letters letters and $numbers numbers and periods."; Just a

Re: number of letters question

2018-05-15 Thread Larry Wall
On Tue, May 15, 2018 at 12:44:12AM -0700, ToddAndMargo wrote: : "abcrd-12.3.4" would be five letters, six numbers, and one : I don't care. Here's another approach: $ p6 '"abcrd-12.3.4".comb.classify(*.uniprop).say' {Ll => [a b c r d], Nd => [1 2 3 4], Pd => [-], Po => [. .]} $ p6

Re: number of letters question

2018-05-15 Thread Timo Paulssen
I'd suggest combing for the regex instead of combing and then grepping with the regex: say + "abcrd-12.3.4".comb(//); though from the problem question it sounds a lot more like what todd wants is     my $input = "abcrd-12.3.4";     my $letters = $input.comb(/<[a..z]>/);     my $numbers =

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 02:45 AM, Brent Laabs wrote: /<+alnum-[_]>/. What does the `+` do? Is there a was to write that to include decimal points (or any other weird character)?

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 02:45 AM, Brent Laabs wrote: Just a quick reminder that matches the underscore, because also does.  If you want to exclude underscores, you can match against /<+alnum-[_]>/.  That adds the alnum character class, but subtracts underscores from it.   Decimal points are definitely

Re: number of letters question

2018-05-15 Thread Brent Laabs
Just a quick reminder that matches the underscore, because also does. If you want to exclude underscores, you can match against /<+alnum-[_]>/. That adds the alnum character class, but subtracts underscores from it. Decimal points are definitely not alphanumeric, though. On Tue, May 15,

Re: number of letters question

2018-05-15 Thread JJ Merelo
El mar., 15 may. 2018 a las 10:17, ToddAndMargo () escribió: > On 05/15/2018 12:57 AM, JJ Merelo wrote: > > Well, > > say + "abcrd-12.3.4".comb.grep: // > > will give you that, but > > say + "abcñé-12.3.4".comb.grep: // > > will yield the same result. > > Roman or other

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 12:57 AM, JJ Merelo wrote: Well, say + "abcrd-12.3.4".comb.grep: // will give you that, but say + "abcñé-12.3.4".comb.grep: // will yield the same result. Roman or other kind of numerals are excluded, though... $ perl6 -e 'say + "abcrd-12.3.4".comb.grep: //;' 9 I don't

Re: number of letters question

2018-05-15 Thread JJ Merelo
Well, say + "abcrd-12.3.4".comb.grep: // will give you that, but say + "abcñé-12.3.4".comb.grep: // will yield the same result. Roman or other kind of numerals are excluded, though... El mar., 15 may. 2018 a las 9:44, ToddAndMargo () escribió: > On 05/15/2018 12:37 AM, JJ

Re: number of letters question

2018-05-15 Thread ToddAndMargo
On 05/15/2018 12:37 AM, JJ Merelo wrote: Hi, El mar., 15 may. 2018 a las 9:31, ToddAndMargo (>) escribió: >> El mar., 15 may. 2018 a las 8:32, ToddAndMargo ( >>

Re: number of letters question

2018-05-15 Thread JJ Merelo
Hi, El mar., 15 may. 2018 a las 9:31, ToddAndMargo () escribió: > >> El mar., 15 may. 2018 a las 8:32, ToddAndMargo ( >> >) escribió: > >> > >> Hi All, > >> > >> Do we have one of those sweet functions that will

Re: number of letters question

2018-05-15 Thread ToddAndMargo
El mar., 15 may. 2018 a las 8:32, ToddAndMargo (>) escribió: Hi All, Do we have one of those sweet functions that will allow us to look at a string and give us back the count of how many "letters" and/or "numbers" are in

Re: number of letters question

2018-05-15 Thread JJ Merelo
IN Perl 6, it's a bit more complicated. Do you want to count graphemes or codepoints? El mar., 15 may. 2018 a las 8:32, ToddAndMargo () escribió: > Hi All, > > Do we have one of those sweet functions that will > allow us to look at a string and give us back the > count of

number of letters question

2018-05-15 Thread ToddAndMargo
Hi All, Do we have one of those sweet functions that will allow us to look at a string and give us back the count of how many "letters" and/or "numbers" are in a string? And are decimal points considered numbers or letters? Many thanks, -T