public class Test8 { public static void main(String[] args) { String content = ""; String regex = "-?([1-9]+|0)\\d*"; System.out.println(content.matches(regex)); } }
java整数的正则表达式
最新推荐文章于 2024-01-04 21:43:16 发布
public class Test8 { public static void main(String[] args) { String content = ""; String regex = "-?([1-9]+|0)\\d*"; System.out.println(content.matches(regex)); } }