I have a big database that has fields of paragraphs that are formatted like this:
["This is the first sentence", "This is the second sentent", "This is the third sentence", "This is the fourth sentence"]
I would like to extract the (using PHP) and put them in an array where each array element is a sentence. Right now, I am using this:
$trim_joined = substr($joined, 2, -2); //gets rid of the first and last bracket and double quote
$sentences = explode('", "', $trim_joined);
It seems a bit fragile because I am not 100% sure that this field follows this exact same format for every row of the database (over 350,000 rows). I was wondering if there is a regular expression that extracts ALL elements of the strings that are inside double quotes and puts them in an array. This way, I don't have to worry if there are entries without the brackets at beginning and end.
Unfortunately, i now little to nothing about regex so asking for help. Thanks in advance