SyntaxFix
Write A Post
Hire A Developer
Questions
This one will reject extraneous commas at the start or end of the line, if that's important to you.
((, )?(^)?(possible|value|patterns))*
Replace possible|value|patterns with a regex that matches your allowed values.
possible|value|patterns