I am trying to find an solution to return a true value if certain expression B which follows expression A is valid.
For instance -
If I'm trying to match the strings with the regex - F[A-Z]{0,2}
F
FA
FB
FAA
FAAA
where F
is expression A here and [A-Z]{0,2}
is expression B here
It is matching FAAA
which it shouldn't since I have mentioned an quantifier max limit to 2.
So the expected output is -
F
FA
FB
FAA