Results 1 to 2 of 2

Thread: how to include variable name in QRegExp?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how to include variable name in QRegExp?

    Hi,
    How can i include variable in a regular expression?
    Actually i want to search a word in a text file.(exact match of the word)
    The word is entered through lineedit.
    Hence i used

    QRegExp rx("\stext");

    But that is not working..
    here text is the variable, i want only the exact match of the word in the file.
    How can i declare that?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how to include variable name in QRegExp?


Similar Threads

  1. Calling QRegExp pattern from a variable gets -1
    By devdon in forum Qt Programming
    Replies: 4
    Last Post: 22nd October 2011, 20:46
  2. QRegExp
    By tebessum in forum Qt Programming
    Replies: 1
    Last Post: 3rd August 2008, 18:44
  3. QRegExp Help
    By Ahmad in forum Qt Programming
    Replies: 2
    Last Post: 28th May 2007, 00:13
  4. QRegExp?
    By Marco812 in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2006, 08:31
  5. need help for my QRegExp
    By patcito in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2006, 16:29

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.