Name
java.lang.String
Description
New methods for pattern matching.
Methods
boolean matches (String
regex
)
Return true if
regex
matches the entireString
.String[ ] split (String
regex
)
Return an array of the substrings surrounding matches of
regex
.String [ ] split (String
regex
, int
limit
)
Return an array of the substrings surrounding the first
limit
-1
matches ofregex
.String replaceFirst (String
regex
, String
replacement
)
Replace the substring matched by
regex
withreplacement
.String replaceAll (String
regex
, String
replacement
)
Replace all substrings matched by
regex
withreplacement
.
Get Regular Expression Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.