日期:2014-05-20 浏览次数:21632 次
System.out.println("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd".replaceAll("TR.*", ""));
------解决方案--------------------
不清楚 你需求
------解决方案--------------------
import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args) { String str = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; Pattern pattern = Pattern.compile("http://.*(?=TR/xhtml1.*)"); Matcher matcher = pattern.matcher(str); while (matcher.find()) { System.out.println(matcher.group()); } } }
------解决方案--------------------
import java. start=startTime.getDay(); var fill=fillTime.getDay(); if(start>=fill&&(startTime.getTime()-fillTime.getTime()<=(6-fill)*24*60*60*1000)) { alert("格式正确!"); }