GRegex in GLib
This morning I committed GRegex to svn, so glib 2.14 will have regular expression support. GRegex is a wrapper around the PCRE library by Philip Hazel that has several interesting features:
- Faster than GNU regexp
- Good Unicode support
- Advanced constructs, such as positive and negative look-ahead and look-behind assertions, named sub-patterns, etc.
- Normal (Perl-like) matching
- Partial matching
- DFA matching to find overlapping matches
GRegex has a nice GLib-ish API that wraps PCRE functions and adds other features:
- Search all non-overlapping matches
- Splitting a string on a pattern
- Literal text replacement
- Text replacement with reference expansion
- String escapement, so patterns can be dynamically generated


GLib lacks a good priority queue (heap queue) implementation. There are many areas where this would be a big benefit, especially since this would allow the implementation of a better scalabale main loop implementation that behaves better with large numbers of time events. Right now the GLib main loop is rather difficult to use efficiently if you have lots of time events.