Code for "All pages except those listed" in Show block on specific pages While editing a block I want to use "Pages on which this PHP code returns TRUE (experts only)" at the same time support the URL's entered in "All pages except those listed" plus my own custom conditions.

Where can I get the standard code to match those URL using PHP code?

For example as in figure initially "All pages except those listed" is checked on but now I want to choose the Experts only(3rd one). 

In this Experts only mode before adding my custom code I'd like to check for exclusion of those same URL's first then proceed.
I made this stuff copying from Core's block.module:

//This block will not show pages when these pattern match
$pages = &lt;&lt;&lt; EOT
adsense/*
node/add/*
adsense/*
contact
privacy
tags/*
terms
about
check-for-expired-job
taxonomy/term/*   
EOT;


$pages = drupal_strtolower($pages);
$path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
$hide_block = drupal_match_path($path, $pages);
if ($path != $_GET['q']) {
    $hide_block = $hide_block || drupal_match_path($_GET['q'], $pages);
}
if($hide_block)
{
return false;
}

//Now do other processing stuff