GuitarRegex
Undocumented
-
Designated Initializer for GuitarRegex
Declaration
Swift
public init(pattern: String)
Parameters
pattern
The pattern that will be used to perform the match.
Return Value
A list of matches.
-
Tests a string to see if it matches the regular expression pattern.
Declaration
Swift
public func evaluate(string: String, options: NSRegularExpression.Options = []) -> [Range<String.Index>]
Parameters
string
The string that will be evaluated.
options
Regular expression options that are applied to the string during matching. Defaults to [].
Return Value
A list of matches.
-
Evaluates a string for all instances of a regular expression pattern.
Declaration
Swift
public func test(string: String, options: NSRegularExpression.Options = []) -> Bool
Parameters
string
The string that will be evaluated.
options
Regular expression options that are applied to the string during matching. Defaults to [].
Return Value
true
if string passes evaluation, otherwise,false
.
-
Evaluates a string to check if it is a valid email address by using a regular expression.
Declaration
Swift
static func isValidEmail(email: String) -> Bool
Parameters
email
The string that needs to be evaluated.
Return Value
true
ifstring
is a valid email address, otherwisefalse
.