Comment by librasteve

Comment by librasteve 7 days ago

0 replies

here is a raku regex (see https://docs.raku.org/language/regexes#Unicode_properties)

  "Dž" ~~ /<:Lt>/    #「Dž」   (matches)
  "Dž" ~~ /<:Lu>/    #Nil   (doesn't match)

  Lt = Titlecase_Letter
  Lu = Uppercase_Letter
raku regex are a step improvement over the original perl5 regex which is used in most current languages (both regex engines were designed by Larry Wall - raku is perl6 with a new name)

deep support for Unicode and Graphemes makes raku almost unique in its support for Unicode properties within this new regex 2.0 (I hear that Swift is also strong in this area)

here is a great blog series by Paweł bbkr Pabian that explains all these unicode things in a very unserstandable way https://dev.to/bbkr/utf-8-regular-expressions-20h0