Re: PCRE Expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux