GRegex regular expression failing to match

2012-05-14 Thread Christopher Howard
I'm trying glib's GRegex functionality for the first time, and apparently I am doing something wrong. I have some code like so: code: GError * error = NULL; GRegex * regex = g_regex_new (^/(d+)$, 0, 0, error); if (error != NULL) { // ... } GMatchInfo *

Re: GRegex regular expression failing to match

2012-05-14 Thread David Nečas
On Mon, May 14, 2012 at 01:36:02PM -0800, Christopher Howard wrote: Is there anything wrong with the regexp, Sure. Two things. It should be ^/[0-9]+$ not ^/d+$ First, it lacks the backslash to make \d a digit atom. But, second, since \d matches a digit (possibly whatever Unicode