Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Help using QRegExp
Qt 6.11 is out! See what's new in the release blog

[Solved] Help using QRegExp

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.7k 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
    #1

    Hi all,

    I need some help with QRegExp.

    I need to find the character ' but I need to omit '

    I try the following QRegExp, but it does not work.

    @
    QRegExp("[^\]'")
    @

    Regards

    David

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Try
      @
      QRegExp("(^)|[^\\\\]");
      @

      Matches * at beginning of line OR * not preceded by **
      Because of escaping, all \s are doubled to \

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dvillalobos
        wrote on last edited by
        #3

        Thanks mlong,

        It helps a lot. :)

        Many thanks.

        Regards

        David

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          No problem! Be sure and retitle the thread as [Solved]. Thanks!

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          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
          • Unsolved