[color=blue][size=x-large]A sample:[/size][/color]
[img]http://dl.iteye.com/upload/attachment/222480/7337b05e-6d43-3c8e-8b34-f4806278d7a1.png[/img]
------------------------------------------------------------
[color=blue][size=x-large]正则表达式查询表:[/size][/color]
[img]http://dl.iteye.com/upload/attachment/222472/b9c2e99b-c0e0-31f9-b94f-05b087b6da03.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/222480/7337b05e-6d43-3c8e-8b34-f4806278d7a1.png[/img]
/**
* description: 取出上图中的单词列表,其他没用的就不要了<br>
* @param args
* Mar 22, 2010
* @author huxiao kskr@qq.com
*/
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]