zoukankan      html  css  js  c++  java
  • day21

    非贪婪匹配

    '''非贪婪匹配:尽可能少的匹配
    {n,}?
    {,n}?
    {n,m}?
    *?
    +?
    ??
    '''

    # 应用场景: 正则一定会有首尾标识,中间匹配的结果会有非贪婪匹配的语法
    s = '<a>abc</a><a></a>'

    # 匹配标签
    print(re.findall(r'<.*>', s))  # ['<a>abc</a><a></a>']
    print(re.findall(r'<.*?>', s))  # ['<a>', '</a>', '<a>', '</a>']

    # 匹配标签的内容
    print(re.findall(r'<a>(.*)</a>', s))  # ['abc</a><a>']
    print(re.findall(r'<a>(.*?)</a>', s))  # ['abc', '']

     

    需求分析

    1. 功能函数

      - 1.注册
      - 2.登录
      - 3.查看余额
      - 4.提现
      - 5.转账
      - 6.还款
      - 7.查看流水
      - 8.购物车
      - 9.查看购物车
      - 10.注销0

    设计程序以及程序的架构

    1. 功能层

    2. 公用模块

    3. 配置文件

    4. 业务逻辑层

    5. 数据访问层

    6. 用户显示层

  • 相关阅读:
    os.remove some jpgs
    shutil.rmtree, os.path, delete sub-folders, format
    How to create folder
    valgrind
    gstream
    TP TN FP FN
    tensor flow
    接口中静态方法和默认方法
    JAVA基础09
    JAVA基础08
  • 原文地址:https://www.cnblogs.com/zhuqihui/p/10846868.html
Copyright © 2011-2022 走看看