Question

Could I get these answered and explained to me? I'm new to system level programming and rather lost on how to answer or think through these. I'll definitely provide a thumbs up to those who can give an explanation along with their answer. Thanks a bunch!

match(es) for expression (maybe each given basic/extended multiple Choose 1. regular no correct match, if no correct option i

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ques 1  a [ab]+ a

Answer 1: Option C is correct

a [ab]+ a means , matches a string that has a followed by a or b

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ques 2  a(bc)*

Answer2: Option E is correct.

a(bc)* , means it matches a string that has a pattern bc in it, *, means that it searches for the pattern bc zero or more times.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ques 3 .[ind]

Answer 3: Option A is correct.

.[ind] , it means a string containing some letters before ind. It means it searches a string which have ind in it, it may be that it i in the end or in between.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ques 4 [a-z]+[a-z]

Answer 4: Option C is correct

[a-z]+[a-z], it searches for the letter in lowercase a to z and matches with other list pattern given i.e[a-z] one or more times.

it basically compares that the string should contain a-z letters and + means it compares it with other set i.e, [a-z] one or more times. In this question it means that the string should contain alphabetic characters only.

Add a comment
Know the answer?
Add Answer to:
Could I get these answered and explained to me? I'm new to system level programming and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part II: Regular Expression 1. Chose match(es) for each given basic/extended regular expression (maybe multiple correct...

    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 3), 4), 5),6), 11) e.g. (ab+a, (extended regex ) a) ababa b) aba c)abba d)aabba 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') ote: 1) to 5)are basic regexes 1) 'a[ab]*a' (a)ababa (b) aaba (c) aabab (d) aabbaa...

  • Could I get these answered and explained to me? I'm new to system level programming and...

    Could I get these answered and explained to me? I'm new to system level programming and rather lost on how to answer or think through these. I'll definitely provide a thumbs up to those who can give an explanation along with their answer. Thanks a bunch! regular Write down the extended 2. expression for following questions. E.g. Socialsecurity number the in format of 999-99-9999. [0-913} [0-9]{2} [0-9]{4} Answer 1) Valid ".edu" (e.g URL beginning with "http://" and ending with ennenennen...

  • Please use Python def findSubstrings(s):     # Write your code here Consider a string, s = "abc"....

    Please use Python def findSubstrings(s):     # Write your code here Consider a string, s = "abc". An alphabetically-ordered sequence of substrings of s would be {"a", "ab", "abc", "b", "bc", "c"}. If the sequence is reduced to only those substrings that start with a vowel and end with a consonant, the result is {"ab", "abc"}. The alphabetically first element in this reduced list is "ab", and the alphabetically last element is "abc". As a reminder: • Vowels: a, e, i,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT