<?php
$haystack = "abc[d]-ef";
preg_match_all('/[][-]/', $haystack, $matches);
print_r($matches);
