java 正则表达式的问题 如何替换 大小写的d regStr = "d?i?u"//这样能行吗?strToReplace.replace(regStr,"<font color='red'>d</font>");谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 String strText = "DDddnihao";Pattern p = Pattern.compile("d", Pattern.CASE_INSENSITIVE);Matcher m = p.matcher(strText);strText = m.replaceAll("");System.out.println(strText); 没太看懂你要干什么,但是正则表达式不应该乱用,能用字符串操作简单解决的就用字符串操作:"<font color='red'>d</font>".replace('d', 'D'); Iterator接口中的hasNext方法在哪里被重写了??? Myeclipse 中tomcat启动的问题 求一个排列的算法? 【疑惑】-java 到底做什么用 请问下JAVA中奇偶排序这样写对么?是否可以改进?? 程序写完了,怎么做成一个双击就能运行的文件!!!??? excuse me -2 请问如何动态生成数组,java不会没有方法实现吧? [news]IBM计划收购Rational 生成PDF报表的问题现在就剩下这一个了,大家帮帮忙,救救兄弟我啊 三层架构和MVC 怎样设置菜单项JMenuItem()的快捷键? System.out.printf格式输出问题
Pattern p = Pattern.compile("d", Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(strText);
strText = m.replaceAll("");
System.out.println(strText);