String
struct String
-
Searches the receiving
String
with the regex given inpattern
, returning the match results.Declaration
Swift
public func grep (pattern:String) -> Regex.MatchResult
-
Searches the receiving string with the regex given in
pattern
, replaces the match(es) withreplacement
, and returns the resulting string.Declaration
Swift
public func replaceRegex(pattern:String, with replacement:String) -> String