I'm trying to create a regex pattern to match a specific string and return true if the string matches the pattern and false if it doesn't. Here are the conditions:
- Must start with
[and end with] - Each item inside the brackets have to be separated by commas
- Each item separated by commas have to follow this regex pattern:
^[A-Za-z][A-Za-z0-9_]*$
How can I make one regex that checks for all these conditions?