<?php$value2 = " 'time': 1376952971";if (preg_match('/^\W*time\W*: (\d+)$/', $value2, $matches)) { echo 'Yes!', PHP_EOL; var_dump($matches);} else { echo "Oh no!";} echo PHP_EOL;var_dump($value2);
Standard input is empty
Yes! array(2) { [0]=> string(19) " 'time': 1376952971" [1]=> string(10) "1376952971" } string(19) " 'time': 1376952971"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!