Regular Expressions
Regular Expressions
4
Class String and Regex
matches (regex) - returns true if a string matches
a given regex
split(regex) - returns array of tokens separated by
delimiters matching regex
replaceAll(regex, substring) replace all the string’s
parts matching regex with the given substring
replaceFirst(regex, substring) replace first
encountered the string’s part matching regex
with the given substring
5