67,512
社区成员
发帖
与我相关
我的任务
分享
cast\('*-*-
cast('%04-%02-
public class CopyOfCopy_3_of_Test {
public static void main(String[] args) {
String str = "cast('09-04-2008";
String regex = "((?<=')\\d{2}(?=-))-((?<=-)\\d{2}(?=-))";
System.out.println(str);
System.out.println(str.replaceAll(regex, "$2-$1"));
}
}