Click here to Skip to main content
15,901,426 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
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*)*
Posted
Updated 24-Oct-11 0:42am
v2

1 solution

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 ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900