Skip to content

Instantly share code, notes, and snippets.

@ejknapp
Created January 27, 2011 22:55
Show Gist options
  • Select an option

  • Save ejknapp/799479 to your computer and use it in GitHub Desktop.

Select an option

Save ejknapp/799479 to your computer and use it in GitHub Desktop.
package java112.labs1;
import java.util.*;
/**
* @author Eric Knapp
* class ParsingDemo
*
*/
public class ParsingDemo {
public void run() {
String test = "Place it into the projects/lib directory, replacing the one that's there now.";
String[] testArray = test.split("\\W");
for (String token : testArray) {
if (token.length() > 0) {
System.out.println(token);
}
}
}
public static void main(String[] args) {
ParsingDemo demo = new ParsingDemo();
demo.run();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment