code: function regex2value(value) {
  
          // highly sensitive!! Do not change this without running the
          // Protocol/HTTP.html unit tests
  
          // convert % to \%
          value = value.replace(/%/g, "\\%");
  
          // convert \\. to \\_ (\\.* occurences converted later)
          value = value.replace(/\\\\\.(\*)?/g, function($0, $1) {
              return $1 ? $0 : "\\\\_";
          });
  
          // convert \\.* to \\%
          value = value.replace(/\\\\\.\*/g, "\\\\%");
  
          // convert . to _ (\. and .* occurences converted later)
          value = value.replace(/(\\)?\.(\*)?/g, function($0, $1, $2) {
              return $1 || $2 ? $0 : "_";
          });
  
          // convert .* to % (\.* occurnces converted later)
          value = value.replace(/(\\)?\.\*/g, function($0, $1) {
              return $1 ? $0 : "%";
          });
  
          // convert \. to .
          value = value.replace(/\\\./g, ".");
  
          // replace \* with * (watching out for \\*)
          value = value.replace(/(\\)?\\\*/g, function($0, $1) {
              return $1 ? $0 : "*";
          });
  
          return value;
      }
docs: Function: regex2value
  Convert the value from a regular expression string to a LIKE/ILIKE
  string known to the web service.
  
  Parameters:
  value - {String} The regex string.
  
  Returns:
  {String} The converted string.