I want read a text file as C++ read it
here is example from the text file
(item(name 256) (desc 520)(Index 1)(Image \"Wea001\") (specialty (aspeed 700))
\w+).*desc\s+(?P\d+).*Index\s+(?P\d+).*Image\s+(?P.*)\).*specialty\s*\((?P.*)\)\)\)/', $txt, $matches);
foreach($matches['name'] AS $id => $name){
echo 'name : '.$name.'
Desc : '.$matches['desc'][$id].'
Index : '.$matches['index'][$id].'
speciality : '.$matches['speciality'][$id].'';
}
Assuming you have always similar data format