Reminder Extended RE operators should not be used for these
Reminder: \"Extended\" RE operators should not be used for these questions - this means you should use *, l, (), and concatenation. You can, however, used \"named\" sets for things such as digits(D), Letters(L), etc. Make sure you answer each question (1a, 1b, 1c, etc.). Write a regular expression (RE) for your first name (a, b, and c are separate questions) first letter capitalized, rest lower case any case combination is acceptable case of name matches first letter - if first is lower, all is lower, ...
Solution
1. (a) L|l*
Here you can see first letter will always be a capital letter then only the string will be accepted. L means captal letters and l means small letters.
(b) (L|l)*
As you can see any combination of L and l will be accepted here.
(c) (l.l*|L|L*l*)
Here if the first letter starts with l then rest of the combinations will always be l. otherwise if the first letter is capital then any combination of L and l will be accepted.
if you like this answer, please give a thumbs up and if you have some doubt just ask in the comment section below. I will try to help. Cheers
