The data I need to parse looks like:
[fild1, filed2, .... filedn] , [filed1, filed2, .... filedn] .....
I call it a special form of CSV data because there are two kinds of comma:
- those commas outside the [] pair are served as the separator between different records.
- those commas inside the [] pair are served as the separator between different fields.
So in this case using split(',' , $data)
will not serve my needs which is to parse the data and get every record in the data.