Results 1 to 3 of 3

Thread: Having a brain cramp on a regex

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Having a brain cramp on a regex

    Quote Originally Posted by Spockmeat View Post
    QRegExp regexp(QString("%1").arg(filterText),Qt::CaseInsen sitive,QRegExp::Wildcard);
    The last parameter tells Qt to interpret your expression as a wildcard, not a regular expression. Either change it to QRegExp::RegExp or drop it.

  2. The following user says thank you to jacek for this useful post:

    Spockmeat (16th July 2007)

  3. #2
    Join Date
    Apr 2006
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Default Re: Having a brain cramp on a regex

    Wow, I feel dumb now

    Thanks for that tip, works fine now.

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
  •  
Qt is a trademark of The Qt Company.