[ create a new paste ] login | about

Link: http://codepad.org/bTtFEQfv    [ raw code | output | fork ]

PHP, pasted on Feb 18:
1
2
3
4
5
6
7
<?php

$str = '10.10.2010 18:34';

$str = preg_replace('/\s.*?$/', '', $str);

var_dump($str);


Output:
1
string(10) "10.10.2010"


Create a new paste based on this one


Comments: