- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
preg_match_all(
'/(?<![\w\'"])(?:[\'"][^\'"]+[\'"]|[\w\']+)(?![\w\'"])/',
"The nation's economy 'is really' poor, but \"might be getting\" better.",
$matches
);
print_r($matches[0]);