Re: PCRE Expression

From: Date: Thu, 25 Oct 2012 17:04:36 +0000
Subject: Re: PCRE Expression
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-319590@lists.php.net to get a copy of this message
which pcre function do you use ? \{(\n*[a-z\-]*:[a-z\s0-9]*;\n*)*\} seems to work on my regex tester. Le 25/10/2012 18:51, Volmar Machado a écrit :
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,} ?
-- Camille Hodoul http://camille-hodoul.com

« previous php.general (#319590) next »