[img]http://dl.iteye.com/upload/attachment/222480/7337b05e-6d43-3c8e-8b34-f4806278d7a1.png[/img]
/**
* description: 取出上圖中的單詞列表,其他沒用的就不要了<br>
* @param args
* Mar 22, 2010
* @author huxiao [email protected]
*/
public static void main(String[] args) {
String testString = "String(fjsi fj\"this is my target word\"lsd jflks)";
Matcher matcher = Pattern.compile("w\\(\\d+,\"[^\"]+\",\"([^\"]+)\"").matcher(testString);
if(matcher.find()){
System.out.println(matcher.group(1));
}
}
------------------------------------------------------------
[color=blue][size=x-large]正則表達式查詢表:[/size][/color]
[img]http://dl.iteye.com/upload/attachment/222472/b9c2e99b-c0e0-31f9-b94f-05b087b6da03.jpg[/img]