Skip to content

Instantly share code, notes, and snippets.

@elliotttf
Created April 16, 2013 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliotttf/5399732 to your computer and use it in GitHub Desktop.
Save elliotttf/5399732 to your computer and use it in GitHub Desktop.
<?php
$strs = array(
'modules/system/system.menus.css',
'modules/system/system.css',
);
$re = '/^(modules\/system\/((?!system\.menus).+)\.css)$/';
foreach ($strs as $str) {
print_r(preg_match($re, $str) ? 'Yay' : 'Boo');
print PHP_EOL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment