From e96e634427cbb5c069e2e07a20c59129bb6d87a7 Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 16 May 2011 16:02:27 +0000 Subject: Escape literal regex correctly --- gentoobrowse/console/packagemasks.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gentoobrowse/console/packagemasks.xml b/gentoobrowse/console/packagemasks.xml index 7a26188..36d00b3 100644 --- a/gentoobrowse/console/packagemasks.xml +++ b/gentoobrowse/console/packagemasks.xml @@ -6,9 +6,9 @@ SELECT d.setno, MIN(field[1]) AS person, MIN(field[2]) AS email, - CAST((REGEXP_MATCHES(MIN(field[3]), '(\\d+ *(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) \\d+)', 'i'))[1] AS DATE) AS dateadded, + CAST((REGEXP_MATCHES(MIN(field[3]), E'(\\d+ *(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) \\d+)', 'i'))[1] AS DATE) AS dateadded, TRIM(STRING_AGG(REGEXP_REPLACE(content, '^#+', ''), ' ' ORDER BY m.line)) AS message - FROM (SELECT setno, line AS line, REGEXP_MATCHES(content, '^# *(.+) +< *(.+) *> \\( *(.+) *\\)$') AS field + FROM (SELECT setno, line AS line, REGEXP_MATCHES(content, E'^# *(.+) +< *(.+) *> \\( *(.+) *\\)$') AS field FROM file_masks_withset WHERE line IN(SELECT min(line) FROM file_masks_withset -- cgit v1.2.3