I’ve never done this before, but basically I’m trying to break a large string up into substrings (based on a regular expression) and then make use of those substrings one at a time. Can anyone show me the easiest way to do this? I just don’t quite know how to use the methods of pattern and matcher.
Thanks!
java.lang.String.split()takes a regular expression and will split the string, returning aString[]containing the substrings:You don’t need to use the
PatternandMatcherclasses to achieve this.