美文网首页
2020-04-02 正则表达式

2020-04-02 正则表达式

作者: 很菜的花椰菜 | 来源:发表于2020-04-02 10:39 被阅读0次

    https://www.jianshu.com/p/b24e5ae9e9ac

    https://deerchao.cn/tutorials/regex/regex.htm

    看一下这个,小数点后 几位 

    https://blog.csdn.net/u012468263/article/details/50621779/

    String pattern = "(([1-9]{1}\\d*)|(0{1}))(\\.\\d{2})?";

            System.out.println("0.2  >  "+("0.2".matches(pattern)));

            System.out.println("07.23  >  "+("07.23".matches(pattern)));

            System.out.println("7.23  >  "+("07.23".matches(pattern)));

            System.out.println("123.58  >  "+("123.58".matches(pattern)));

            System.out.println("123.589  >  "+("123.589".matches(pattern)));

    https://zhidao.baidu.com/question/426858151178186572.html

    https://www.cnblogs.com/zery/p/3438845.html

    相关文章

      网友评论

          本文标题:2020-04-02 正则表达式

          本文链接:https://www.haomeiwen.com/subject/bectphtx.html