$re = '/\/\*[^*]*\*+([^\/*][^*]*\*+)*\/
/';
$str = '/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
/* @TODO:
- Notes...
*/
/* = = = Set Base Font Size = = = So 1em = 10px / 1.8em = 18px etc */
body { font-size: 62.5% }
body, ul, li {
color: #333333;
font-family: \'Open Sans\', verdana, arial, helvetica, helve, sans-serif;
font-weight: 400;
/* font-size: 1.4em; Default font = 14px normal weight Open Sans using #333333 */
line-height: 1.25em;
}
body {
margin: 0; /* Nav bar and footer need to fit edge to edge so no margins! */
padding: 0;
top: 0;
border-bottom: 1px #1C1C1C solid; /* To remove white space under the popup footer */
}
/* = = = Typography = = = */
/* Font choice was carefully considered, Open Sans is very popular so many visitors will already have it cached. */
/* Monda & Shadows into light are also quite popular so may be cached too */
/* = = = Headings = = = */
h1, h2, h3, h4, h5, h6 {
font-family: \'Monda\', \'Trebuchet MS\', verdana, arial, helvetica, helve, sans-serif;
font-weight: 400;
line-height: 1.2em;
letter-spacing: 1px;
color: #333333;
margin-top: 10px;
margin-bottom: 20px;
}
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php