Re: How do I do literal quotes in a regex?

2019-12-10 Thread ToddAndMargo via perl6-users
On 2019-12-09 00:46, Fernando Santagata wrote: On Mon, Dec 9, 2019 at 9:38 AM Fernando Santagata mailto:nando.santag...@gmail.com>> wrote: It can be used this way: $ raku -e'say „Hello!“' Hello! But it must be used with that closing quote '“' (U+201C); it cannot be used

Re: How do I do literal quotes in a regex?

2019-12-09 Thread Trey Harris
On Mon, Dec 9, 2019 at 03:54 Fernando Santagata wrote: > On Mon, Dec 9, 2019 at 9:38 AM Fernando Santagata < > nando.santag...@gmail.com> wrote: > >> It can be used this way: >> >> $ raku -e'say „Hello!“' >> Hello! >> But it must be used with that closing quote '“' (U+201C); it cannot be >> used

Re: How do I do literal quotes in a regex?

2019-12-09 Thread Fernando Santagata
On Mon, Dec 9, 2019 at 9:38 AM Fernando Santagata wrote: > It can be used this way: > > $ raku -e'say „Hello!“' > Hello! > But it must be used with that closing quote '“' (U+201C); it cannot be > used paired with itself: > There's another quotation mark that can be used with '„', it's '”'

Re: How do I do literal quotes in a regex?

2019-12-09 Thread Fernando Santagata
On Mon, Dec 9, 2019 at 1:27 AM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > What is the unicode for the subscript double quote „ ? > That's U+201E and can it be used together with the regular > quote the same as 「」 ? > It can be used this way: $ raku -e'say „Hello!“' Hello!

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
On 2019-12-08 19:34, Brad Gilbert wrote: I like to use them, but I am not you. Hi Brad, I am going to create a keeper and give it a shot! It is not like I don't have four or five of them open when I am programming :-) -T

Re: How do I do literal quotes in a regex?

2019-12-08 Thread Brad Gilbert
I like to use them, but I am not you. On Sun, Dec 8, 2019 at 8:19 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2019-12-08 18:04, Brad Gilbert wrote: > > I do not quite understand the question. > > > > I told you how to directly enter unicode by remembering the codepoint. >

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
On 2019-12-08 18:04, Brad Gilbert wrote: I do not quite understand the question. I told you how to directly enter unicode by remembering the codepoint. It's still the same characters. I would definitely recommend setting up, and getting used to Compose keys. I use them all the time for

Re: How do I do literal quotes in a regex?

2019-12-08 Thread Brad Gilbert
I do not quite understand the question. I told you how to directly enter unicode by remembering the codepoint. It's still the same characters. I would definitely recommend setting up, and getting used to Compose keys. I use them all the time for things like « » ‘ ’ “ ” ¹²³⁴⁵⁶⁷⁸⁹⁰¯⁺≠ On Sun,

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
On 2019-12-08 06:22, Brad Gilbert wrote: Personally though I just use 「Ctrl+Shift+u f f 6 2 Space」 and 「Ctrl+Shift+u f f 6 3 Space」 Hi Brad, Your technical opinion: is it better for maintainability to stick with escape sequences or to use the unicodes? I ask as I will never remember them.

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
On 2019-12-08 08:46, Fernando Santagata wrote: You won't believe it :-) but Raku's wonderful documentation has a page on how to enter Unicode characters: https://docs.raku.org/language/unicode_entry Hi Fernando, Oh they sure do go to town on that one! That page is nicely done. What is the

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
On 2019-12-08 06:22, Brad Gilbert wrote: Personally though I just use 「Ctrl+Shift+u f f 6 2 Space」 and 「Ctrl+Shift+u f f 6 3 Space」 So basically I just remember how to directly type in Unicode codepoints, and those the two codepoints. Taught me something new. Thank you!

Re: How do I do literal quotes in a regex?

2019-12-08 Thread Fernando Santagata
You won't believe it :-) but Raku's wonderful documentation has a page on how to enter Unicode characters: https://docs.raku.org/language/unicode_entry That page also links to a GitHub project which offers a .XCompose ready to use. I started from that and added some faster and easier (for me) to

Re: How do I do literal quotes in a regex?

2019-12-08 Thread Brad Gilbert
I would recommend setting up a compose key. But that is not enough because I don't think it has a binding for those two characters. So you would also have to modify the config to include them. I think that 「Compose [ [ 」 and 「Compose ] ] 」 might be what I would set them as. Note that 「‘」 is

Re: How do I do literal quotes in a regex?

2019-12-08 Thread ToddAndMargo via perl6-users
> On Sat, Dec 7, 2019 at 12:51 AM ToddAndMargo via perl6-users > mailto:perl6-us...@perl.org>> wrote: > > Hi All, > > Is there a `Q[]` that can be used in a regex? > > I am looking for how to get around > > my $x = Q[\:\\::]; ( my $y = $x ) ~~ s/ '' /x/; say $y > \:x:: > >

Re: How do I do literal quotes in a regex?

2019-12-07 Thread Brad Gilbert
The shortcut spelling of Q[…] is to use 「 and 」 (U+FF62 and U+FF63) my $x = 「\:\\::」; ( my $y = $x ) ~~ s/ 「\\」 /x/; say $y \:\\:: The case could be made that \Q[\\] should work as well. (It would need to be added). (Along with \q[…] and \qq[…]) Note that \Q[…] doesn't work in string

How do I do literal quotes in a regex?

2019-12-06 Thread ToddAndMargo via perl6-users
Hi All, Is there a `Q[]` that can be used in a regex? I am looking for how to get around my $x = Q[\:\\::]; ( my $y = $x ) ~~ s/ '' /x/; say $y \:x:: This does not work: my $x = Q[\:\\::]; ( my $y = $x ) ~~ s/ Q[\\] /x/; say $y \:\\:: Nor does this: my $x = Q[\:\\::]; ( my $y = $x ) ~~