zoukankan      html  css  js  c++  java
  • 2019.9.11课程设计报告

    一、当天完成的任务

       写好了报告的正文和文献引用部分,队友负责整合和其他部分的撰写。

       看了点正则表达式,算是提前为12月份的CCF热个身。贴个链接和代码:

       https://www.bilibili.com/video/av31470518?from=search&seid=15051048559353276683

       

    public static void main(String[] args) {
        // 要验证的字符串
        String str = "service@xsoftlab.net";
        // 邮箱验证规则
        String regEx = "[a-zA-Z_]{1,}[0-9]{0,}@(([a-zA-z0-9]-*){1,}\.){1,3}[a-zA-z\-]{1,}";
        // 编译正则表达式
        Pattern pattern = Pattern.compile(regEx);
        // 忽略大小写的写法
        // Pattern pat = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);
        Matcher matcher = pattern.matcher(str);
        // 字符串是否与正则表达式相匹配
        boolean rs = matcher.matches();
        System.out.println(rs);
    }
    public static void main(String[] args) {
        // 要验证的字符串
        String str = "baike.xsoftlab.net";
        // 正则表达式规则
        String regEx = "baike.*";
        // 编译正则表达式
        Pattern pattern = Pattern.compile(regEx);
        // 忽略大小写的写法
        // Pattern pat = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);
        Matcher matcher = pattern.matcher(str);
        // 查找字符串中是否有匹配正则表达式的字符/字符串
        boolean rs = matcher.find();
        System.out.println(rs);
    }

       

    二、第二天的计划

       再给代码写点注释,传gitlab

    三、每日小结

       ①报告好难写啊,感觉做的挺多的,但写起来感觉做的还是不够

       ②正则表达式真滴好用嘎嘎嘎

  • 相关阅读:
    【python】requests库
    pycharm新建项目时选择virtualenv的说明
    cookie、session、token
    读写锁--DEMO
    锁降级--防止线程安全问题
    mysql-left join
    index-document-shard
    ES-常见搜索方式
    SpringBoot在自定义类中调用service层等Spring其他层
    mongodb crud
  • 原文地址:https://www.cnblogs.com/RecKono/p/11508493.html
Copyright © 2011-2022 走看看