abhijeetmaharana
July 18th, 2007, 07:17 PM
Does anyone have a regular expression for capturing package names from strings of the type
Not installed: please install libnss-dev: usr/lib/pkgconfig/mozilla-nss.pc mozilla-dev: usr/lib/pkgconfig/mozilla-nss.pc
The regex should capture "libnss-dev" and "mozilla-dev" from the above string.
Currently I am using
(\S*): usr\S*
It gets me libnss-dev. But I am unable to repeat this pattern so that all such occurrences are captured. The information at http://www.regular-expressions.info/captureall.html seems to be helpful but I am unable to apply it here.
(This question is from http://ubuntuforums.org/showthread.php?p=3040432#post3040432)
Not installed: please install libnss-dev: usr/lib/pkgconfig/mozilla-nss.pc mozilla-dev: usr/lib/pkgconfig/mozilla-nss.pc
The regex should capture "libnss-dev" and "mozilla-dev" from the above string.
Currently I am using
(\S*): usr\S*
It gets me libnss-dev. But I am unable to repeat this pattern so that all such occurrences are captured. The information at http://www.regular-expressions.info/captureall.html seems to be helpful but I am unable to apply it here.
(This question is from http://ubuntuforums.org/showthread.php?p=3040432#post3040432)