I want to get the special chars found in string using PHP code, Here is my trial code:
$page_num =">256";
if(preg_match('^[-<>]+$', $page_num))
{
//Here it should returns special chars present in string..
}
check this
$page_num =">256";
if(preg_match_all('/\W/', $page_num,$matches))
{
print_r($matches);
}