$date could be "23/09/2012" or "23-09-2012" or "23\09\2012" 
preg_split('/[\/\-\\]/', $date);
Not sure why PHP keep throw missing terminating ] error?
preg_split('/[\/\-\\]/', $date);
                   ^escaping the closing ']' 
Do the following instead, to remove ambiguity
preg_split('/[\/\-\\\\]/', $date);
There is no need to escape -, but you could use \- as well.
Code:
$date = 'as\sad-s/p';
$slices =  preg_split('/[\/\-\\\\]/', $date);
print_r($slices);
Output:
Array ( [0] => as [1] => sad [2] => s [3] => p )
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With