I have the following pattern:\[code\][\{\}].*[\{\}]\[/code\]With the following test strings (can provide more if needed):\[code\]}.prop{hello:ars;} //shouldn't match}#prop{} //should match}.prop #prop {} //should match\[/code\]The purpose of the pattern is to find empty css rulesets. Can someone suggest how I go about excluding matches with characters between the second set of brackets? I will be updating the pattern as I get closer to a solution.editn http://gskinner.com/RegExr/this pattern: \[code\][\}].*[\{]{1}[/}]{1}\[/code\]seems to have the desired result although it is breaking when transfered to php for reasons I don't understand.edit: first apologies if this should be a separate question.Using the pattern in the first edit in php:\[code\] $pattern = "/[\}].*[\{]{1}[/}]{1}/"; preg_match_all ($pattern, $new_css, $p); print_r($p);\[/code\]When $new_css is a string of the content of an uploaded css file containing empty rulesets, $p is never populated. Yet I know this pattern is ok. Can anyone see what the issue is?