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. How to search the repeat pattern with QRegExp and get the separate result?
Forum Updated to NodeBB v4.3 + New Features

How to search the repeat pattern with QRegExp and get the separate result?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 483 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.
  • J Offline
    J Offline
    jemyzhang
    wrote on last edited by
    #1

    when I search a group of data, 0,1,2,3,4 for example, I use ( [0-9],){3} as the reg-expression. I think the result will be "0","1","2","3", but in fact, the result given by QRegExp is cap(0)="0,1,2,3,", cap(1)="3", the middle matches are missing.

    and because of that I have to use the most stupid way ( [0-9],)( [0-9,)... to fulfill my requirement.
    So, any smart way to do it?

    1 Reply Last reply
    0

    • Login

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