So here is my question
i have the following string
"Are you sure you want to import the MacGourmet data file named \"%@?\"" = "";
"Are you sure you want to import the MacGourmet file named \"%@?\"" = "";
"Are you sure you want to import the MasterCook file named \"%@?\"" = "";
"Are you sure you want to import the Meal-Master file named \"%@?\"" = "";
"Import MasterCook file?" = "Importer le fichier MasterCook ?";
i have to extract string inside the double quotes for this i am writting the code
preg_match_all('#"([^"]*)"\s*=\s*"([^"]*)";#', $this->text, $match);
but in the $match variable i am getting the following array
Array
(
[0] => Array
(
[0] => "" = "";
[1] => "" = "";
[2] => "" = "";
[3] => "" = "";
[4] => "Import MasterCook file?" = "Importer le fichier MasterCook ?";
)
[1] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] => Import MasterCook file?
)
[2] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] => Importer le fichier MasterCook ?
)
)
But the array should be
Array
(
[0] => Array
(
[0] => "Are you sure you want to import the MacGourmet data file named\"%@?\"" = "";
[1] => "Are you sure you want to import the MacGourmet file named \"%@?\""= "";
[2] => "Are you sure you want to import the MasterCook file named \"%@?\"" = "";
[3] => "Are you sure you want to import the Meal-Master file named \"%@?\"" = "";
[4] => "Import MasterCook file?" = "Importer le fichier MasterCook ?";
)
[1] => Array
(
[0] => Are you sure you want to import the MacGourmet data file named\"%@?\"
[1] => Are you sure you want to import the MacGourmet file named \"%@?\"
[2] => Are you sure you want to import the MasterCook file named \"%@?\"
[3] => Are you sure you want to import the Meal-Master file named \"%@?\"
[4] => Import MasterCook file?
)
[2] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] => Importer le fichier MasterCook ?
)
)
Can you tell me the tweak in in my regular expression.
Thanks in advance.