代码块
1 public static void main(String[] args) { 2 test t = new test(); 3 String a = "a+-b+ -c+ -d -e"; 4 System.out.println(a); 5 System.out.println(a.replaceAll("(-|\\+| )",",")); 6 }
运行结果
a+-b+ -c+ -d -e
a,,b,,,c,,,d,,e
标签:class AC div body ffffff replace eal col span
1 public static void main(String[] args) { 2 test t = new test(); 3 String a = "a+-b+ -c+ -d -e"; 4 System.out.println(a); 5 System.out.println(a.replaceAll("(-|\\+| )",",")); 6 }
a+-b+ -c+ -d -e
a,,b,,,c,,,d,,e
标签:class AC div body ffffff replace eal col span
原文地址:https://www.cnblogs.com/anitinaj/p/8656132.html