正则求助 我想从[[indicator1]]+[[expression2]]+[[label2]]中获得indicator1、expression2、label2我用了正则:attern p = Pattern.compile("\\[\\*\\]\\]");结果不行......高手指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 "[[indicator1]]+[[expression2]]+[[label2]]".split("[^\\w]+") 这样就可以了 "[[indicator1]]+[[expression2]]+[[label2]]".split("[^\\w]+") public static void main(String[] args) { String str = "[[indicator1]]+[[expression2]]+[[label2]]"; Matcher m = Pattern.compile("\\[\\[(.*?)\\]\\]").matcher(str); while(m.find()){ System.out.println(m.group(1)); } } Java中 Frame的一个问题 请问关于电信开发短信问题 有关于available判断网络文件大小出错的问题 怎样在JAVA应用程序中设置类路径 关于字符集 按钮事件触发的问题? 用JCreator开发Java项目到底怎样? 如何为JTree添加右键菜单? 问几个初级的问题,大家指教啦! 为什么会产生这样的错误呢? 关于ScheduledThreadPoolExecutor 关于播放MP3的程序
public static void main(String[] args) {
String str = "[[indicator1]]+[[expression2]]+[[label2]]";
Matcher m = Pattern.compile("\\[\\[(.*?)\\]\\]").matcher(str);
while(m.find()){
System.out.println(m.group(1));
}
}