Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QRegularExpression question.

QRegularExpression question.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 503 Views
  • 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.
  • S Offline
    S Offline
    samzhcs1
    wrote on last edited by
    #1

    0_1478394416251_upload-8a59c186-4a90-47de-a974-5820c07a807f
    the top half code shows match value is 0.
    But the bottom half code shows hasMatch value is 1,seems QRegExp class exactMatch() match completely, but QRegularExpression class match partially.

    Any body knows how to make QRegularExpression do completely match?

    Paul ColbyP 1 Reply Last reply
    0
    • S samzhcs1

      0_1478394416251_upload-8a59c186-4a90-47de-a974-5820c07a807f
      the top half code shows match value is 0.
      But the bottom half code shows hasMatch value is 1,seems QRegExp class exactMatch() match completely, but QRegularExpression class match partially.

      Any body knows how to make QRegularExpression do completely match?

      Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by
      #2

      Hi @samzhcs1,

      Any body knows how to make QRegularExpression do completely match?

      As per Exact Matching, you simply ensure your expression begins with ^ and ends with $.

      In your examples above, you have the starting ^ already, but not the finishing $ anchor.

      Cheers.

      1 Reply Last reply
      2

      • Login

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