Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] Qt Creator search: Regular expressions
Forum Update on Monday, May 27th 2025

[Solved] Qt Creator search: Regular expressions

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 5.2k 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    Two of the regular expressions I need most for search are "match any string" and "match any one character".

    I always fall into that trap when I enter a search term such as
    @void set*(const bool *);@
    ...and actually expected them to find something.

    Of course, there is the complete documentation of QRegExp, but I am sorry to say that these very basic regular expressions are buried somewhere in the pages of dozens of other expression terms.

    For matching any single character, I need to use the .(dot), I found out.
    But I cannot seem to find a working "match any string" term. I though it must be [^.], but that does not work as expected.

    Edit: Found it.
    Match single character: .
    Match any string: .*

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      .* is match any character any number of time including zero. This might not be what you want, be careful

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        Yes, this is what I want. Thanks for clarifying.

        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