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. How to search partial text?

How to search partial text?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 4 Posters 399 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    In QtCreator editor - is there a way to search for partial text ?
    for example "test*" to get " test plus anything ".

    Christian EhrlicherC J.HilkJ JonBJ 3 Replies Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • A Anonymous_Banned275

      In QtCreator editor - is there a way to search for partial text ?
      for example "test*" to get " test plus anything ".

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Simply searching for 'test' will also find 'test plus anything'.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • A Anonymous_Banned275

        In QtCreator editor - is there a way to search for partial text ?
        for example "test*" to get " test plus anything ".

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @AnneRanch by clicking on the icon in the search bar on the left hand side, you can enable regex search. Doesn't get more universal/powerful than that

        44ffdbd3-4ff5-4190-8d86-124a66f1e174-image.png


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        1
        • A Anonymous_Banned275

          In QtCreator editor - is there a way to search for partial text ?
          for example "test*" to get " test plus anything ".

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @AnneRanch
          It depends precisely what you mean by " test plus anything ".

          As @Christian-Ehrlicher said, if you really mean test plus anything, including nothing (i.e. at end of line), you might as well just search for test like that, doesn't matter whether regular expression or not.

          If your test* is supposed to be a regular expression, be aware that this does not search for test necessarily. It would search for tes followed by any number of ts, 0 or more. This pattern would be right if you are wanting to access a filename from a terminal/command prompt, but that is not a regular expression, as used in the Creator text editor or others.

          The equivalent as a regular expression would be test.*. Note the "dot"/"period", meaning any character. But then you might just as well search for plain test.

          If you wanted test followed by something (i.e. not at end of line), that would be test.+. That is a "plus" instead of a "star".

          If you stipulate exactly what you want to match/not match there are other constructs in regular expressions which may do precisely what you want (e.g. you can search for just a "word" of test, or start of a word, or a non-word, or others).

          1 Reply Last reply
          1

          • Login

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