Index: trunk/FACT++/src/showlog.cc
===================================================================
--- trunk/FACT++/src/showlog.cc	(revision 16967)
+++ trunk/FACT++/src/showlog.cc	(revision 16968)
@@ -19,5 +19,6 @@
         ("end,e",     var<string>(), "End time to be displayed (e.g. 21:00:13)")
         ("verbose,v", var<int16_t>()->implicit_value(true)->default_value(8), "Verbosity level (0:only fatal errors, 8:everything)")
-        ("color,c",   po_bool(false), "Process a file which already contains color codes")
+        ("color,c",   po_switch(), "Process a file which already contains color codes")
+        ("strip,s",   po_switch(), "Strip color codes completely")
         ;
 
@@ -65,5 +66,5 @@
 
 
-void showlog(string fname, const Time &tbeg, const Time &tend, int16_t severity, bool color)
+void showlog(string fname, const Time &tbeg, const Time &tend, int16_t severity, bool color, bool strip)
 {
     // Alternatives
@@ -71,5 +72,5 @@
     // \x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]
     // \x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]
-    const boost::regex reg("\x1B\[[0-9;]*[a-zA-Z]");
+    const boost::regex reg("\x1B\[([0-9]{1,3}(;[0-9]{1,3})?[a-zA-Z]");
 
     const uint32_t night = atoi(fname.c_str());
@@ -93,5 +94,5 @@
     while (getline(fin, buffer, '\n'))
     {
-        if (color)
+        if (color || strip)
             buffer = boost::regex_replace(buffer, reg, "");
 
@@ -130,5 +131,5 @@
         }
 
-        if (buffer.size()>1)
+        if (buffer.size()>1 && !strip)
         {
             int16_t lvl = -1;
@@ -161,5 +162,5 @@
         }
 
-        log << buffer << endl;
+        (strip?cout:log) << buffer << endl;
     }
 }
@@ -194,8 +195,8 @@
 
     if (files.size()==0)
-        showlog("", tbeg, tend, conf.Get<int16_t>("verbose"), conf.Get<bool>("color"));
+        showlog("", tbeg, tend, conf.Get<int16_t>("verbose"), conf.Get<bool>("color"), conf.Get<bool>("strip"));
 
     for (auto it=files.begin(); it!=files.end(); it++)
-        showlog(*it, tbeg, tend, conf.Get<int16_t>("verbose"), conf.Get<bool>("color"));
+        showlog(*it, tbeg, tend, conf.Get<int16_t>("verbose"), conf.Get<bool>("color"), conf.Get<bool>("strip"));
 
     return 0;
