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

Re: I need unprintable regex help

Thread Previous | Thread Next
From:
Brandon Allbery
Date:
October 20, 2018 16:29
Subject:
Re: I need unprintable regex help
Message ID:
CAKFCL4U3Zh9eLsXn3Ob2idLS9qE3cP2w_v2sKYJdN8AU5Bv5QA@mail.gmail.com
The escape sequence \x allows you to embed characters by their code.
"\x0D\x0A" is the same as the variable.

I'm not sure what you thought I was showing you on IRC last night, since I
pointed this out multiple times.

On Sat, Oct 20, 2018 at 3:43 AM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> Hi All,
>
>     my Str $CrLf   = chr(0x0d) ~ chr(0x0a);
>     $String ~~ s:global/ $CrLf /\n/;
>
> How do I get rid of the extra $CrLf variable?
>
> Many thanks,
> -T
>


-- 
brandon s allbery kf8nh
allbery.b@gmail.com

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