BSONRegularExpression
public struct BSONRegularExpression : Equatable, 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
BSONRegularExpressionwith the provided pattern and options.Declaration
Swift
public init(pattern: String, options: String) -
Initializes a new
BSONRegularExpressionwith the pattern and options of the providedNSRegularExpression.Declaration
Swift
public init(from regex: NSRegularExpression) -
Converts this
BSONRegularExpressionto anNSRegularExpression. Note:NSRegularExpressiondoes not support thellocale dependence option, so it will be omitted if it was set on this instance.Declaration
Swift
public func toNSRegularExpression() throws -> NSRegularExpression
View on GitHub
Install in Dash
BSONRegularExpression Structure Reference