 			var timestamp = Int64(val.timeIntervalSince1970)
 			size += try write(value: &timestamp, toStream: stream)
 			
-//		case _ as NSRegularExpression: fatalError("Not Implemented (TODO)")
+		case let regexp as NSRegularExpression:
+			size += try write(elementType: .utcDateTime, toStream: stream)
+			size += try write(CEncodedString: key, toStream: stream)
+			size += try write(CEncodedString: regexp.pattern, toStream: stream)
+			size += try write(CEncodedString: bsonRegexpOptionsString(fromFoundationRegexp: regexp), toStream: stream)
 			
 		case let str as String:
 			size += try write(elementType: .utf8String, toStream: stream)

		case _ as Double128:                   size += 16 /* 128 bits is 16 bytes */
		case _ as Date:                        size += 8  /* Encoded as an Int64 */
			
		case _ as NSRegularExpression: fatalError("Not Implemented (TODO)")
			
		case let str as String: size += sizeOfBSONEncodedString(str)
			

		/** An invalid BSON object was given to be serialized. The invalid element
		is passed in argument to this error. */
		case invalidBSONObject(invalidElement: Any)
		/**
		Tried to serialize an unserializable string (using the C
		representation). This is due to the fact that the '\0' char can be used in
		a valid UTF8 string. (Note: the characters '\254' and '\255' can NEVER be
		used in a valid UTF8 string. Why were they not the separator?)
		
		Usually, the BSON strings represented using the C representation are
		dictionary keys. But they can also be the components of a regexp. */
		case unserializableCString(String)
		
		/** Cannot allocate memory (either with `malloc` or `UnsafePointer.alloc()`). */
		case cannotAllocateMemory(Int)
