I need to restrict a particular
string to the following format. i.e multiple strings can be concatenated by & operators followed by ! operator. But once the concatenated string has a ! operator in it, no more strings can be used to concatenate using the & operator.
For eg;
A&E!Y!Z!W is allowed
But A&E&Y!Z&W is not allowed.
How can this be achieved ?
Regards