asRegularExpression

fun asRegularExpression(): BsonRegularExpression

Gets this value as a BsonRegularExpression if it is one, otherwise throws exception

Return

an BsonRegularExpression

Throws

if this value is not of the expected type