I want to turn (05 May, 2012
in to 05 May, 2012
with preg_replace (basically removing brackets), but since I am useless with regex I have no idea how to do this
code attempts
preg_match('/[0-9]+(?:\.[0-9]*)?/', '(05 May, 2012', $matches);
if($matches){
$match= $matches[0];
}else{
$match= '';
}
$match = preg_replace('/[0-9]+(?:[0-9]*,)?/','$1','(05 May, 2012');
any help would be appreciated. thanks
if you're "useless" with regex use a simpler function then
$date = trim($date,"()");
$date = preg_replace('/\(([0-9]+ [A-Za-z]+\, [0-9]{4})/','$1',$date);