The problem I am having is the string may start with a quote. The pattern is ,<true|false>,,,,,,
Some the numbers with decimals can be negative or positive. The final array I need looks like this...
"Cloaca",false,0,0.0,0.0,0.0,0.0,0.0
"Transverse septum",true,71,89.87341772151899,0.08377172,0.02481389578163773,0.8709677419354839,0.8461538461538461
Vitelline duct,false,0,0.0,0.0,0.0,0.0,0.0
Allantois,false,1,1.2658227848101267,0.36915635,-0.038461538461538464,0.0,0.038461538461538464
Ventral mesentery,true,7,8.860759493670885,0.05629368,0.013647642679900734,0.12903225806451613,0.11538461538461539
Original String
"Cloaca",false,0,0.0,0.0,0.0,0.0,0.0,"Transverse septum",true,71,89.87341772151899,0.08377172,0.02481389578163773,0.8709677419354839,0.8461538461538461,Vitelline duct,false,0,0.0,0.0,0.0,0.0,0.0,Allantois,false,1,1.2658227848101267,0.36915635,-0.038461538461538464,0.0,0.038461538461538464,Ventral mesentery,true,7,8.860759493670885,0.05629368,0.013647642679900734,0.12903225806451613,0.11538461538461539
Patterns Tried
$pattern = '/("?[\sa-zA-Z]+"?,(true|false),(\d+,-?\d+\.\d+,-?\d+\.\d+,-?\d+\.\d+,-?\d+\.\d+,-?\d+\.\d+,?))/';
$pattern = '/("?[\sa-zA-Z]+"?,(false|true),\d+,-?\d+\.\d+,-?\d+\.\d+,-?\d\.\d+,-?\d\.\d+,-?\d\.\d+)/';
$pattern = '/(.+,(false|true),[0-9]{1,},[0-9]{1,}\.[0-9]{1,},-?[0-9]{1,}\.[0-9]{1,},-?[0-9]{1,}\.[0-9]{1,},-?[0-9]{1,}\.[0-9]{1,},-?[0-9]{1,}\.[0-9]{1,})/';
I've have to many patterns to show. Any help will help save a head of hair. Still learning RegEx.