code: function regexSerializer(fieldName) {
    return function(cswGroup, json, propertyName, options) {
      if (defined(cswGroup[fieldName])) {
        json[fieldName] = cswGroup[fieldName].source;
      }
    };
  }
docs: /* Serializes a regex like /.foo/i into ".foo"