Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

请问参数验证为什么不用正则表达式呢 #7

Open
Zhang-Siyang opened this issue Sep 29, 2018 · 3 comments
Open

请问参数验证为什么不用正则表达式呢 #7

Zhang-Siyang opened this issue Sep 29, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Zhang-Siyang
Copy link

比如 https://github.com/NUAA-Open-Source/NUAA-iCal-Python/blob/master/NUAAiCal/main.py#L84

if not (xq == '1' or xq == '2'):

1或2可以用'[12]'这样的正则表达式去匹配

同一文件 L68

if '-' in xn:

如果用'20/d{2}-20/d{2}'来匹配会省后边再次验证的代码

@Triple-Z
Copy link
Member

Triple-Z commented Sep 29, 2018

学习了学习了,你是怎么找到这个项目的?

有兴趣提个 PR?

@Triple-Z Triple-Z self-assigned this Sep 29, 2018
@Triple-Z Triple-Z added the enhancement New feature or request label Sep 29, 2018
@Triple-Z Triple-Z reopened this Sep 29, 2018
@Zhang-Siyang
Copy link
Author

我也在做校历导出,Google到的这个项目

我尝试提交一下PR

@Triple-Z
Copy link
Member

@Zhang-Siyang 哈哈,好的,期待你的 PR ~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants