Results 1 to 2 of 2

Thread: need help for my QRegExp

  1. #1
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default need help for my QRegExp

    I have a QRegExp that looks like this:
    Qt Code:
    1. QRegExp rxpercent("percent done: [0,9]{1,3}.[0,9]");
    To copy to clipboard, switch view to plain text mode 

    the problem is that the number of whitespace between percent done: and [0,9]{1,3}.[0,9] varies depending on th number of digit. Is there a regexp to catch something like:

    Qt Code:
    1. QRegExp rxpercent("percent done:<unknown occurence of whitespace>[0,9]{1,3}.[0,9]");
    To copy to clipboard, switch view to plain text mode 

    thanx in advance

    Pat

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

    Default Re: need help for my QRegExp

    Use "\\s+" or "\\s*".

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

    patcito (27th May 2006)

Similar Threads

  1. QRegExp
    By evgenM in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 14:22
  2. QRegExp
    By evgenM in forum Newbie
    Replies: 2
    Last Post: 24th March 2006, 12:52
  3. Trouble parsing using simple QRegExp
    By johnny_sparx in forum Qt Programming
    Replies: 4
    Last Post: 24th February 2006, 00:42
  4. IP adresses with QRegExp (Qt3)
    By jlbrd in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 13:43

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.