Question: Part II: Regular Expression 1. Chose match(es) for each given basic/extended regular expression (maybe multiple correct matches) and describe the pattern of matched string for


Part II: Regular Expression 1. Chose match(es) for each given basic/extended regular expression (maybe multiple correct matches) and describe the pattern of matched string for 1), 2), 7), 8), 10) e.g. 'abta'for extended regex engine) a) ababa b) aba c)abba d)aabbaa e)aa Answer: b,c ; Pattern : The matched string should begin and end with a' and 'b'occurs at least once between leading and ending 'a) 1) 'a[ab]*a' (a)ababa (b) aaba (c) aabab (b) a(bc)? (b) window (c) end (d) aabbaa (e)aa (d) a (d) good (d)x+1(e) x+a 2) 'a(bc)?' a) abc (c) a(bc e) abcbc 3) 'ind] (a) wind (e)will (a) a+b+c(b)+b(c) x (a) a+b+c(b)+b(c) x (d)x+1(e) x+a (a)azbc (b) az (c) (d) acc (eJacz 7) a.[0-9]' (a)azz (b) a0z (c) a01 (d) a0a (e)aza (a)good! (b) Book. (c) hard? (d) cool?hot(e)nothing 9) [a-z]+.1?!]s*[A-Z]' (hint: \s matches any whitespace characters) (a)Grade. A (b) book. Z (c) E. G(d) Level. a(e)index?a 10) '(very)+(cool )?(goodlbad) weather (a)good weather (b) very good weather (c) cool weather (d) very cool bad weather (e)cool good weather (a)3312(b) -2231 (c) +32 (d) 0.5 (a)3312 (b) -2231 (c) +32 (d) 0.5 11) -?10-9]+ (e)2/3 12) ?[0-9],[0-9]* (e)2/3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
