as(_:)

Attempts to load an instance of Regex from this variant.

BSON.AnyValue.swift:300
func `as`(_: BSON.Regex.Type) -> BSON.Regex?

Returns

The payload of this variant if it matches regex(_:), nil otherwise.