I would like to identify the following pattern on a string (all words are separated by comma)
1. The string starts with RO,TA,PR
2. The string ends with TA,TO
3. After RO,TA,PR it can have multiples TA,PR
Example of valid patterns:
- RO,TA,PR,TA,TO
- RO,TA,PR,TA,PR,TA,TO
- RO,TA,PR,TA,PR,TA,PR,TA,TO
- RO,TA,PR,TA,PR,TA,PR,TA,PR,TA,TO
- RO,TA,PR,TA,PR,TA,PR,TA,PR,TA,TO
Example of invalid patterns:
- RO,PR,TA,TO
- RO,TA,TO,PR,TA,TO
- RO,TA,RO,TA,TO
- RO,TA,PR,TO