I currently have a language where it consists of elements {R,G,A} that has a valid sequence. An example of valid sequence would be R,RG,RGA,RGAR,RGARG,RGARGA where R must always come first, G second and A third.
An example of not valid strings would be RA,GRA,RGAG,RGARR and etc where the ordering is broken.
I'm trying to figure out a regular expression for the language in which it corresponds to the valid order of the strings.
I could only think of something like:
R(GA)* but I'm having difficulties maintaining the valid order of the strings.