NSRegularExpression
public extension NSRegularExpression
The NSRegularExpression extension
-
Initializer to initialize regular expression with some pattern
Declaration
Swift
convenience init(_ pattern: String)Parameters
patternregular expression pattern
-
checks if the String matches the regular expression or not
Declaration
Swift
func matches(_ string: String) -> BoolParameters
stringString to be matched
Return Value
true if String matches the pattern else returns false
View on GitHub