Re: Regular expressions with glib?



On Mon, 2004-04-12 at 09:02, James Henstridge wrote:
> Eike Lange wrote:
> 
> >Hi Folks!
> >
> >I would like to contribute some regular expression code to GLib.
> >This code uses "regexec(3)" and "regcomp(3)" to do all the stuff with 
> >regular expressions (requires regex.h).
> >
> >My questions is, whether I should base this code on "GString" or
> >"gchar *" (requires string.h)  and if you think this contribution 
> >could be useful.
> >  
> >
> If regular expression support was going to be added to glib, the 
> standard library regexp routines probably won't be sufficient, since 
> they aren't guaranteed to work with UTF-8 strings (for glib, UTF-8 is 
> probably the only encoding worth supporting).
> 
> As for whether it should work on (GString *) or (gchar *), I'd go for 
> (gchar *).

The idea for regular expressions is to wrap PCRE, which gives us
UTF-8 support and Perl regular expressions. The bug tracking this is
http://bugzilla.gnome.org/show_bug.cgi?id=50075
and it even has a recent patch...

Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]