正则表达式有帮助! [英] regular expressions help!
本文介绍了正则表达式有帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我真的在正则表达式方面苦苦挣扎,我必须提供以下正则表达式的英文说明,任何人都可以请帮助我..
一世. a(aa)*
ii. a(b * ab * ab *)*
iii. b(b * ab * ab *)*
hi im really struggling with regular expression i have to give english descriptions of the following regular expressions can anyone please please please help me..
i. a(aa)*
ii. a(b*ab*ab*)*
iii. b(b*ab*ab*)*
推荐答案
i.找到一个"a",然后是零个或多个倍的"aa"应该被看到
ii.找到一个"a",然后是此模式的零次或多次:
(
零次或多次"b",然后零次或多次"ab",然后零次或多次"ab"
)
iii.找到一个"b",然后是此模式的零次或多次:
(
零次或多次"b",然后零次或多次"ab",然后零次或多次"ab"
)
我认为可以将两个 ab * 合并为一个 ab * .你不这样认为吗?
i. Find a "a" followed by either zero or more times "aa"s should be seen
ii. Find a "a" followed by either zero or more times of this pattern :
(
zero or more times "b" followed by zero or more times "ab" followed by zero or more times "ab"
)
iii. Find a "b" followed by either zero or more times of this pattern :
(
zero or more times "b" followed by zero or more times "ab" followed by zero or more times "ab"
)
I think two ab* could be merged to a one ab*. Don''t you think so ?
这篇关于正则表达式有帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文