Redian新闻
>
关于wildcard match和regex match的一个问题
avatar
关于wildcard match和regex match的一个问题# JobHunting - 待字闺中
j*2
1
wildcard:
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
regex:
‘.’ Matches any single character.
‘*’ Matches zero or more of the preceding element.
假设用recursion, 怎样的examples会导致exponentional time?
Note that for pattern "******", we can use a loop to skip those. Thus, ("
aaaaaaaab", "*****ab") is not such an example.
avatar
h*8
2
好像找不出这样的例子。wiki 上的例子是{(a|aa)*b, aaaaaaab},但是这里我们不用
实现()和|。

【在 j********2 的大作中提到】
: wildcard:
: '?' Matches any single character.
: '*' Matches any sequence of characters (including the empty sequence).
: regex:
: ‘.’ Matches any single character.
: ‘*’ Matches zero or more of the preceding element.
: 假设用recursion, 怎样的examples会导致exponentional time?
: Note that for pattern "******", we can use a loop to skip those. Thus, ("
: aaaaaaaab", "*****ab") is not such an example.

avatar
j*2
3
wildcard:
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
regex:
‘.’ Matches any single character.
‘*’ Matches zero or more of the preceding element.
假设用recursion, 怎样的examples会导致exponentional time?
Note that for pattern "******", we can use a loop to skip those. Thus, ("
aaaaaaaab", "*****ab") is not such an example.
avatar
h*8
4
好像找不出这样的例子。wiki 上的例子是{(a|aa)*b, aaaaaaab},但是这里我们不用
实现()和|。

【在 j********2 的大作中提到】
: wildcard:
: '?' Matches any single character.
: '*' Matches any sequence of characters (including the empty sequence).
: regex:
: ‘.’ Matches any single character.
: ‘*’ Matches zero or more of the preceding element.
: 假设用recursion, 怎样的examples会导致exponentional time?
: Note that for pattern "******", we can use a loop to skip those. Thus, ("
: aaaaaaaab", "*****ab") is not such an example.

avatar
c*t
5
"aaaaaaab" "*ab" recursion 就是exponentional time吧

【在 j********2 的大作中提到】
: wildcard:
: '?' Matches any single character.
: '*' Matches any sequence of characters (including the empty sequence).
: regex:
: ‘.’ Matches any single character.
: ‘*’ Matches zero or more of the preceding element.
: 假设用recursion, 怎样的examples会导致exponentional time?
: Note that for pattern "******", we can use a loop to skip those. Thus, ("
: aaaaaaaab", "*****ab") is not such an example.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。