Hello, I am stuck trying to come up with a regular expression to validate, and then grab out into an array of the following data structure. I did not build this data structure but I am trying to work with it. Any ideas?
THE FORMAT OF THE DATA: Label "option1" "option2" "option3"
The Label is the first element of this and is not enclosed in quotes, the individual options however are enclosed in quotes.
So i need to validate that the user entered the data in this format with unlimited "options"
The second part would be to at a later time get this data and put it into an array with the "Label" as the  element of an array to make an array like this.
will not match the Label "option1" etc that you posted. As you have only specified lower case letters in your classes (so Label wont match), and there is no digits in your quoted part (so option1 wont match).
$pattern = '%([a-z]+) ("[a-z]+\d"...space in here...?)+%i'; will match what you put up. Stupid forum removing spaces...
Dont know if your problem is sorted as you are using different data to the example, or if you havent tested your work. So this may, or may not help you ;)