[perl #131757] Untodoed evil hack in Backtrace.pm

2017-07-16 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #131757] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131757 > See this:

Re: String to array problem

2017-07-16 Thread Brent Laabs
$ perl6 > my $x='ls -al "Program Files" "Moe Curly Larry"'; ls -al "Program Files" "Moe Curly Larry" > ( "qww<$x>" ).perl ("ls", "-al", "Program Files", "Moe Curly Larry") How about this? Obligatory: Much EVAL, very danger wow. On Sun, Jul 16, 2017 at 6:03 PM, ToddAndMargo

RE: String to array problem

2017-07-16 Thread Mark Devine
T, Sorry (newbie, remember). For the first question that did not have backslash double-quotes: my ($x, @y); $x = 'ls -al "Program Files" "Moe Curly Larry"'; @y = $x ~~ m:global/ [ '"' <-[ " ]> * '"' | \S+ ] /; for @y -> $match { say ~$match; } Don't know about the second question with

RE: String to array problem

2017-07-16 Thread Mark Devine
T, Disclaimer: P6 newbie/P5 intermediate -YMMV Regex that looks (1) quoted strings (2) any non-space-chars: / [ '"' <-[ " ]> * '"' | \S+ ] Smartmatch globally when comparing with $x $x ~~ m:global Since regex matches return Match object,

RE: String to array problem

2017-07-16 Thread Mark Devine
T, This regex seems to work in both cases: m:global/ [ \\? '"' <-[ " ]> * \\? '"' | \S+ ] /; #!/usr/bin/env perl6 use v6; my ($x, @y); $x = 'ls -al "Program Files" "Moe Curly Larry"'; @y = $x ~~ m:global/ [ \\? '"' <-[ " ]> * \\? '"' | \S+ ] /; for @y -> $match { say ~$match; } $x = 'ls -al

Re: String to array problem

2017-07-16 Thread ToddAndMargo
On 07/16/2017 06:01 PM, Brandon Allbery wrote: Once again: http://www.mail-archive.com/perl6-users@perl.org/msg03986.html It includes a Grammar that supports arbitrarily nested quotes, which can't be done in a plain regex: you could maybe handle one level, but not nesting. I understand now.

Re: String to array problem

2017-07-16 Thread Brandon Allbery
Once again: http://www.mail-archive.com/perl6-users@perl.org/msg03986.html It includes a Grammar that supports arbitrarily nested quotes, which can't be done in a plain regex: you could maybe handle one level, but not nesting. On Sun, Jul 16, 2017 at 8:59 PM, ToddAndMargo

Re: String to array problem

2017-07-16 Thread ToddAndMargo
On 07/16/2017 05:57 PM, Brandon Allbery wrote: Nested quotes and escapes are handled by the Grammar-based solution I pointed to. You can't handle them in general with a simple regex. Creating a new grammer?

Re: String to array problem

2017-07-16 Thread Brandon Allbery
Nested quotes and escapes are handled by the Grammar-based solution I pointed to. You can't handle them in general with a simple regex. On Sun, Jul 16, 2017 at 8:54 PM, ToddAndMargo wrote: > > -Original Message- >> From: ToddAndMargo [mailto:toddandma...@zoho.com]

Re: String to array problem

2017-07-16 Thread ToddAndMargo
-Original Message- From: ToddAndMargo [mailto:toddandma...@zoho.com] Sent: Sunday, July 16, 2017 8:35 PM To: perl6-users Subject: Re: String to array problem On 07/16/2017 05:16 PM, Mark Devine wrote: T, my $x = 'ls -al "Program Files" "Moe Curly Larry"'; my @y =

Re: String to array problem

2017-07-16 Thread ToddAndMargo
-Original Message- From: ToddAndMargo [mailto:toddandma...@zoho.com] Sent: Sunday, July 16, 2017 8:35 PM To: perl6-users Subject: Re: String to array problem On 07/16/2017 05:16 PM, Mark Devine wrote: T, my $x = 'ls -al "Program Files" "Moe Curly Larry"'; my @y

RE: String to array problem

2017-07-16 Thread Mark Devine
T, my $x = 'ls -al "Program Files" "Moe Curly Larry"'; my @y = ~($x ~~ m:global/ [ '"' <-[ " ]> * '"' | \S+ ] /); Mark Devine -Original Message- From: ToddAndMargo [mailto:toddandma...@zoho.com] Sent: Sunday, July 16, 2017 7:41 PM To: perl6-users Subject: String

Re: String to array problem

2017-07-16 Thread ToddAndMargo
-Original Message- From: ToddAndMargo [mailto:toddandma...@zoho.com] Sent: Sunday, July 16, 2017 7:41 PM To: perl6-users Subject: String to array problem Hi All, I have been scratching my head trying to figure out how to turn a string with quotes in it into an

Re: String to array problem

2017-07-16 Thread Brandon Allbery
On Sun, Jul 16, 2017 at 7:41 PM, ToddAndMargo wrote: > my $x='ls -al "Program Files" "Moe Curly Larry"'; > > Desired result: > my @y; >$y[0] = 'ls'; >$y[1] = '-la'; >$y[2] = 'Program Files'; >$y[3] = 'Moe Curly Larry'; > This was just discussed a few days

String to array problem

2017-07-16 Thread ToddAndMargo
Hi All, I have been scratching my head trying to figure out how to turn a string with quotes in it into an array. my $x='ls -al "Program Files" "Moe Curly Larry"'; Desired result: my @y; $y[0] = 'ls'; $y[1] = '-la'; $y[2] = 'Program Files'; $y[3] = 'Moe Curly Larry'; Any words of

[perl #130384] [UNI] degenerates: Mo or Mn Unicode characters combine with punctuation

2017-07-16 Thread Samantha McVey via RT
Bug has been open a while, and I have not forgotten it, I had just not reached a final decision. After further thought I'm closing this WONTFIX. It would needlessly complicate our grapheme concatenation and in addition I believe it may break some of the grapheme concatenation tests.