Qt Regexp assistance

antoine afaux at sainteloi.com
Mon Oct 25 15:22:58 BST 2004


Le samedi 23 Octobre 2004 02:29, Frank Aune a écrit :
> 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«
> 
> 
> 
Try something like this : ("([^:]+$)") 

Antoine

-
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