This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
ab5tract \o/ 08:18
habere-et-disper I can negate a character class with a minus prefix. This doesn't extend to Unicode properties or did I miss something ? 20:29
antononcube Can you give an example? 20:30
You can always use a conditional code block in the regex to check for are some conditions of the match are met. (Well, you most likely know that...) 20:32
librasteve Its negation is this: <:!property>. So, <:!Lu> matches a single character that is not an upper-case letter.
habere-et-disper Thanks -- so it's a ! for Unicode properties and a - for a character class. =b 20:37
librasteve ^^ i got this from the docs, it seems that char class union with + and negation with - is common across both regular and unicode classes 20:38
/<:Zs + [\x9] - [\xA0] - [\x202F] >/ # Any character with "Zs" property, or a tab, but not a "no-break space" or "narrow no-break space"
so maybe you can use '-' on unicode ones also ... but I haven't tried it 20:39