sexta-feira, julho 09, 2004

Regular expression dummy example

public static void main(String[] args) throws Exception {
// Create a pattern to match breaks
Pattern p = Pattern.compile("[\",\\s]+");
// Split input with the pattern
String[] result = p.split("\"one\",\"two\",\"three\" , \"four\" , \"five\"");
for (int i=0; iSystem.out.println(result[i]);
}
}

Nenhum comentário: