PCRE Expression
| From: | Volmar Machado | Date: | Thu, 25 Oct 2012 16:51:19 +0000 |
| Subject: | PCRE Expression | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-319589@lists.php.net to get a copy of this message | ||
Hi All,
I have this expression : '/\{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)\}/s'
which grep all single property css like:
.chalala{
float:left;
}
.chalala{float:left;}
.chalala{
float:left;}
But I want to grep multiples properties like:
.chalala{
float:left;
float:right;
}
So I think that I need to repeat subgroup many times and put a '*'
after subgroup, like this: '/\{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)*\}/s'
but didn't work, how I can check if a subgroup repeat {0,} ?