Qt Regexp assistance

Frank Aune faune at stud.ntnu.no
Sat Oct 23 01:29:24 BST 2004


Hello, 

Im working on a project where I need to regexp output from a shellcommand, and 
process it in the project. The output from the shell command "emerge -s 
<foo>" is:

*  app-bar/foo
      Latest version available: 1.3.6-r3
      Latest version installed: [Not installed]
      Size of downloaded files: 100 kB
      Homepage:    http://www.gentoo.org/
      Description: Utility to be foo bar.
      License:     GPL-2


I want to separate the output in different caps, where "* app-bar/foo" is 
cap(1), "Latest version available: 1.3.6-r3" is cap(2) and so on for each 
line up to cap(7).

Today im using: 

static QRegExp rx_parse("(.*)");

which of course matches everything. Ive been playing with the kregexpeditor 
for a few hours now, but I cant really figure out a working regexp.

(Its not entirely neccesary to have the description fields in the caps, only 
the values btw - as I can fill in the description fields later)

Thanks for any assistance.

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list