YFSy5osoQRcM7WrgD4mFl[69/74] - "R8fwVK86BCPRueldnSYD-sample-sample.vol03+04.par2" yEnc (1/3) (1/3) I need to get R8fwVK86BCPRueldnSYD from it, is that possible ? Or to get YFSy5osoQRcM7WrgD4mFl
Here you go try this: (greedy-less syntax) <pre> <?php $data = 'YFSy5osoQRcM7WrgD4mFl[69/74] - "R8fwVK86BCPRueldnSYD"-sample-sample.vol03+04.par2" yEnc (1/3) (1/3)'; preg_match('/[^\[]*/', $data, $find); //This one works for 1st match! echo '1st match: '.$find[0]."\n"; #or ##print_r($find); preg_match('/\s"(.*?)"/', $data, $find); //This one works for 2nd match! echo '2nd match: '.$find[1]."\n"; #or ##print_r($find); ?> </pre> PHP: ROOFIS