ams-tschoening commented on a change in pull request #83:
URL: https://github.com/apache/logging-log4cxx/pull/83#discussion_r770285461



##########
File path: src/test/cpp/util/transformer.cpp
##########
@@ -116,14 +116,29 @@ void Transformer::createSedCommandFile(const std::string& 
regexName,
 
        std::string tmp;
 
+       auto sedSanitizer = [] (const std::string& in, const std::string& 
sedSeparator = "Q")
+       {
+               std::string ret = in;
+               std::string replaceTo = "\\" + sedSeparator;
+               size_t pos = 0;
+
+               while((pos = ret.find(sedSeparator, pos)) != std::string::npos)
+               {
+                       ret.replace(pos, sedSeparator.length(), replaceTo);
+                       pos += replaceTo.length();
+               }
+
+               return ret;
+       };
+
        for (log4cxx::Filter::PatternList::const_iterator iter = 
patterns.begin();
                iter != patterns.end();
                iter++)
        {
                tmp = "sQ";

Review comment:
       I've tested and `--regexp-extend` is supported by my GIT-SED. Though, it 
seems I have missed again that regular expression are used and need to be 
supported, making my thoughts somewhat useless. :-) So let's simply keep things 
as they are now and change when needed as needed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to