From 6898a7c65a6c687259aac1ba9a5eb0112ff49647 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Sun, 14 Jul 2013 16:54:34 +0300 Subject: [PATCH] FIX: regex pattern extraction (e.g. --output-regex) Change the op_s and op_m (of the lutil_regex_op) patterns used to extract the regex pattern properties, making the following possible: $ quvi get -g '%t:s/\//_/' URL Signed-off-by: Toni Gundogdu --- src/util/regex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/regex.c b/src/util/regex.c index a4c98f8..f806111 100644 --- a/src/util/regex.c +++ b/src/util/regex.c @@ -1,5 +1,5 @@ /* quvi - * Copyright (C) 2012 Toni Gundogdu + * Copyright (C) 2012,2013 Toni Gundogdu * * This file is part of quvi . * @@ -39,7 +39,7 @@ /* Check if the pattern is a s/// operation. */ static gboolean _chk_opmode_s(const gchar *p, lutil_regex_op_t *op) { - static const gchar *op_s = "^(%\\w):s/(.*?)/(.*?)/(.*?)$"; + static const gchar *op_s = "^(%\\w):s/(.*)/(.*)/(.*)$"; GMatchInfo *m; GRegex *re; @@ -78,7 +78,7 @@ static gboolean _chk_opmode_s(const gchar *p, lutil_regex_op_t *op) /* Check if the pattern is a m// operation. */ static gboolean _chk_opmode_m(const gchar *p, lutil_regex_op_t *op) { - static const gchar *op_m = "^(%\\w):(.*?)/(.*?)/(.*?)$"; + static const gchar *op_m = "^(%\\w):(.*)/(.*)/(.*)$"; GMatchInfo *m; GRegex *re; -- 2.11.4.GIT