From 8f89edf17cb772fdf84470b5cfff02884fcc9f7c Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 27 Feb 2012 17:25:01 +0000 Subject: [PATCH] + fix bug in regex insertion (string was inserted in wrong place) --- src/common/regexTools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/regexTools.cpp b/src/common/regexTools.cpp index c4b157ef6..f3d52d2af 100644 --- a/src/common/regexTools.cpp +++ b/src/common/regexTools.cpp @@ -18,6 +18,7 @@ */ #include "regexTools.h" +#include std::map regexCache; @@ -61,7 +62,7 @@ void appendToFirstOccurence(std::string &content, const std::string regex, cons if (matcher->find()) { UErrorCode status = U_ZERO_ERROR; - content.insert(matcher->start(status), replacement); + content.insert(matcher->end(status), replacement); } }