注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 匿名 于 2020-2-2 01:24 编辑 UZ_CODE_0 ]
- #* Phase 2 *
- #We now want to handle '*'. '*' means that the previous character in the pattern can be repeated 0 or more times.
- #**Examples**
- #* `assert match('a*', 'a') is True`
- #* `assert match('a*', '') is True`
- #* `assert match('a*b', 'b') is True`
- #* `assert match('a*b', 'a') is False`
- #* `assert match('a*b', 'aaaaaaab') is True`
- #* `assert match('a*b*c*', 'aaaaaaab') is True`
复制代码
|