Is there a function, something like http://php.net/manual/en/function.preg-match-all.php ?
Using GLib http://references.valadoc.org/#!api=glib-2.0/GLib.MatchInfo, all i'v found is :
public bool match_all_full (string str, ssize_t string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError
Using the standard algorithm for regular expression matching only the longest match in the string is retrieved, it is not possible to obtain all the available matches.
and it says it is not possible to obtain all the available matches.
I wasn't able to find any working code sample. Thanks for your help.
Note:
the objective is to parse a plist file (i only need CFBundleIdentifier and CFBundleName values)
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>nodejs</string>
<key>CFBundleName</key>
<string>Node.js</string>
<key>DocSetPlatformFamily</key>
<string>nodejs</string>
<key>isDashDocset</key><true/><key>dashIndexFilePath</key><string>nodejs /api/documentation.html</string></dict>
</plist>
I have these dependencies availabes (the ubuntu synapse package):
Build-Depends: debhelper (>= 9),
dh-autoreconf,
gnome-common,
valac (>= 0.16.0),
libzeitgeist-2.0-dev (>= 0.9.14),
libdbus-glib-1-dev,
libgtk-3-dev (>= 3.0.0),
libglib2.0-dev (>= 2.28.0),
libgee-0.8-dev (>= 0.5.2),
libjson-glib-dev (>= 0.10.0),
libkeybinder-3.0-dev,
libnotify-dev,
librest-dev,
libappindicator3-dev (>= 0.0.7)
As a results it gives me
** Message: main.vala:28: CFBundleIdentifier: cakephp
** Message: main.vala:28: CFBundleName: CakePHP
** Message: main.vala:28: DocSetPlatformFamily: cakephp
To the question why not using xmllib ? The project has few dependecies, in a GNU system (despite i'm a newbie), programs are packaged assuming only certains dependency, if i wan"t my plugin to be used, i think i have to use only the available dependencies or i might broke something et block the update for the endsudoer.