RegularExpression
public struct RegularExpression : BSONValue, Equatable, Codable, Hashable
A struct to represent a BSON regular expression.
-
The pattern for this regular expression.
Declaration
Swift
public let pattern: String
-
A string containing options for this regular expression.
Declaration
Swift
public let options: String
-
Initializes a new
RegularExpression
with the provided pattern and options.Declaration
Swift
public init(pattern: String, options: String)
-
Initializes a new
RegularExpression
with the pattern and options of the providedNSRegularExpression
.Declaration
Swift
public init(from regex: NSRegularExpression)
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to: Encoder) throws