8
我將如何分析這樣的文件:的Java:讓每一個正則表達式匹配的字符串數組
Item costs $15 and is made up of --Metal--
Item costs $64 and is made up of --Plastic--
我可以做
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(input);
String result = m.group();
但我將如何讓每一個結果呢?
謝謝!我試過了,之前沒有用。一定是我的正則表達式搞砸了。 – 2011-02-07 06:02:44