 		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 regexp as NSRegularExpression:
+			size += regexp.pattern.utf8.count + 1
+			size += bsonRegexpOptionsString(fromFoundationRegexp: regexp).utf8.count + 1
 			
 		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)
		/** One of the key cannot be serialized in an unambiguous way. Said key is
		given in arg of the error. */
		case unserializableKey(String)
		
		/** Cannot allocate memory (either with `malloc` or `UnsafePointer.alloc()`). */
		case cannotAllocateMemory(Int)

		
		/* Let's get the UTF8 bytes of the string. */
		let bytes = [UInt8](str.utf8)
		guard !bytes.contains(0) else {throw BSONSerializationError.unserializableCString(str)}
		
		let curWrite = bytes.withUnsafeBufferPointer { p -> Int in return stream.write(p.baseAddress!, maxLength: bytes.count) }
		guard curWrite == bytes.count else {throw BSONSerializationError.cannotWriteToStream(streamError: stream.streamError)}
