Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QRegularExpression and Unicode Blocks
Qt 6.12 LTS is out! See what's new in the release blog

QRegularExpression and Unicode Blocks

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 603 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dvillalobos
    wrote on last edited by dvillalobos
    #1

    Hi all

    It is supposed that QRegularExpression fully supports Unicode, but I can't get \p{InBasic_Latin} and
    \p{InLatin-1_Supplement} (unicode blocks) to work. Any idea?

    QRegularExpression myExp = QRegularExpression("`\\p{Block: InBasic_Latin}*`")
    Warning: QRegularExpressionPrivate::doMatch(): called on an invalid QRegularExpression object
    

    Regards

    David

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      From https://doc.qt.io/qt-5/qregularexpression.html

      For an overview of the regular expression syntax supported by QRegularExpression, please refer to the [...] pcrepattern man page

      And from that page:

      The long synonyms for property names that Perl supports (such as \p{Letter}) are not supported by PCRE, nor is it permitted to prefix any of these properties with "Is".

      Basically: Qt uses pcre in QRegularExpression and that library doesn't support those blocks

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      4

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved