Question: Write a regular expression pattern that matches familial relationships involving a mother, father, son, daughter, and the words Great, grand, and Step. To simplify the
Write a regular expression pattern that matches familial relationships involving a mother, father, son, daughter, and the words Great, grand, and Step. To simplify the problem, we will use just the first letters (case is important) of these words with no spaces between them. The symbol GGgs means great great grandson.
Legal: Should Match : m, gf, Ggm, GGgf, Ss,, SGgs,
Illegal: Should Not Match: mf, Gm, SSm, GSm,
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
