Results 1 to 2 of 2

Thread: How to convert the regular expression in opposite one? (QRegExp)

  1. #1
    Join Date
    May 2011
    Posts
    5
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X

    Default How to convert the regular expression in opposite one? (QRegExp)

    Hi everyone! Is there any way to convert the particular regular expression in opposite one? For example, if I have "A\\d", it matches A1, A2... Now, I want it to matches everything, but NOT A1, A2 ... How to do this?

  2. #2
    Join Date
    May 2011
    Posts
    5
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Re: How to convert the regular expression in opposite one? (QRegExp)

    It seems that it can be done just by including the negative lookahead assertion: (?!A\\d)

Similar Threads

  1. Regular Expression Problem
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 27th February 2009, 09:41
  2. set a regular expression on QTextEdit
    By mattia in forum Newbie
    Replies: 3
    Last Post: 27th March 2008, 10:16
  3. Regular expression in QLineEdit?
    By vishal.chauhan in forum Qt Programming
    Replies: 3
    Last Post: 1st October 2007, 10:58
  4. Find with Regular Expression?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2007, 14:44
  5. How to get a QString from a file (use regular expression)
    By fengtian.we in forum Qt Programming
    Replies: 16
    Last Post: 31st May 2007, 11:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.