# A regular expression for ending with abb

## A regular expression for ending with abb

Let us see the Regular expression for ending with abb, defined over {a,b}

# Regular expression=(a+b)*abb

Rule

All strings ending with abb must be accepted and all other strings must be rejected by our Regular Expression.

## DFA for Regular expression=(a+b)*abb

ACCEPTABLE STRINGS (PART OF THIS LANGUAGE)

These strings are part of the given language and must be accepted by our Regular Expression.

• 3 strings of length 1 = no string exist.
• 3 strings of length 2 = { no string exist }
• 3 strings of length 3 = {abb,no more strings}
• 3 strings of length 4 = { aabb,babb, no more strings}
• 3 strings of length 5 = {aaabb,bbabb,ababb, and many more similar strings}
• 3 strings of length 7= {aabbabb, bbbbabb,abababb, and many more similar strings }
• 3 strings of length 10 ={aabbabbabb,bbbbabbabb,abababbabb, and many more similar strings }
• 3 strings of length 15 = {aabbabbabbababb,bbbbabbabbaaabb, abababbabbbaabb, and many more similar strings }
• 3 strings of length 20 = {aabbabbabbababbaaabb, bbbbabbabbaaabbbbabb, abababbabbbaabb, and many more similar strings }
• 3 string of length 25 ={aabbabbabbababbaaabbaaabb, bbbbabbabbaaabbbabbbbabb, abababbabbbaabbbbabbaaabb, and many more similar strings }.
• Many more similar strings.

Unacceptable strings (not part of this language)

These strings are not part of the given language and must be rejected by our Regular Expression.

• 3 strings of length 1 ={a,b……}
• 3 strings of length 3 = {aaa,bbb, bab, and many more similar strings }
• 3 strings of lenth 5 ={aaaaa,bbbbb,aaaba, and many more similar strings }
• 3 strings of length 7 ={aaaaaaa,bbbbbbb,aaaaaab, and many more similar strings }
• 3 strings og length 15 ={aaaaaaaaaaaaaaa,ababaababababba,bbbbbbbbbbbbbb,babababababaaab, and many more similar strings }
• 3 strings of  length 25={aaaaaaaaaaaaaaaaaaaaaaa,bbbbbbbbbbbbbbbbbbbbb,aaaaaabababababababababab, and many more similar strings }
• Many more similar strings.

## Tutorial: Regular Expression

A detailed tutorial of the regular expression is here in the link of regular expression tutorial. This page contains the practice questions of regular expressions with solutions.

Tutorial covering the topics

• Give a regular expression.
• Describe the strings of the regular expression.
• write a regular expression.
• create all strings from regular expression.
• Generate all strings from regular expression.
• Extract all strings from regular expression.
• Find all strings from regular expression.
• Examples of regular expression.