RegexParser
public final class RegexParser: Parser<String, String>
A parser that parses Strings with a given regular expression
-
Possible errors while using RegexParser
See moreDeclaration
Swift
public enum Error: ParseError -
The pattern of the parser
Declaration
Swift
public let regex: String -
Initialize a new RegexParser with a regular expression
Declaration
Swift
public init(_ regex: String)Parameters
regexthe regular expression to use
-
Parses an e-mail-address
Declaration
Swift
public static let mail = """ -
Parses an http(s) address
Declaration
Swift
public static let httpAddress = """ -
Parses an IP address
Declaration
Swift
public static let ipAddress = """ -
Parses a semantic version number (1.0.0, 1.0, …) thanks to https://git.daplie.com/coolaj86/semver-utils
Declaration
Swift
public static let semver = """
View on GitHub
RegexParser Class Reference