develooper Front page | perl.perl6.users | Postings from June 2018

Re: How do I remove leading zeros?

Thread Previous | Thread Next
From:
Brandon Allbery
Date:
June 13, 2018 19:13
Subject:
Re: How do I remove leading zeros?
Message ID:
CAKFCL4XQ-dkQaU9+MS-m3HTZ=ycuehLtJV7ps4EasaLR6OomDg@mail.gmail.com
https://docs.perl6.org/language/regexes#Capture_markers:_%3C(_)%3E

On Wed, Jun 13, 2018 at 3:10 PM Xin Cheng <xincheng99@gmail.com> wrote:

> Now we know the meaning of >> and <<. But what about <( and )> ? What do
> they mean here?
>
> Thanks.
> Xin
>
> On Jun 13, 2018, at 2:18 PM, Brad Gilbert <b2gills@gmail.com> wrote:
>
> On Wed, Jun 13, 2018 at 1:09 PM ToddAndMargo <ToddAndMargo@zoho.com>
> wrote:
>
>
> On 06/13/2018 11:06 AM, ToddAndMargo wrote:
>
> On 06/13/2018 11:03 AM, ToddAndMargo wrote:
>
> On 06/13/2018 11:00 AM, Larry Wall wrote:
>
>
>    $ p6 'my $x = "01.000.103.006.10"; $x ~~ s:g/«0+)>\d//; say "$x"'
>    1.0.103.6.10
>
>
> Hi Larry,
>
>     How did you get thee "«" character to appear?  And
> what does it mean?
>
>
> The way I type them is [compose] [<] [<], which is nice because their
> ASCII equivalent is <<
>
> It means match a word boundary with the word being on the right side.
>
> say 'ABC DEF ' ~~ m:g/ << . /
>
>    (「A」 「D」)
>
> say 'ABC DEF ' ~~ m:g/ >> . /
>
>    (「 」 「 」)
>
>
>

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About