Immer ein array mit allen string einem Regulären Ausdruck entspricht

Wie würde ich parse eine Datei wie diese:

Item costs $15 and is made up of --Metal--
Item costs $64 and is made up of --Plastic--

Kann ich tun

Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(input);
String result = m.group();

Aber wie würde ich JEDES Ergebnis?

InformationsquelleAutor Joshua Coffey | 2011-02-07

Schreibe einen Kommentar