Hi I'm building an parser for my own project called vibrant.

i need a file to be parsed, but I can't seem to get the right expression

please please help;

$src = "
<vibrant application="application 1">
1<vibrant application="application 2">
2<br>
</vibrant>
</vibrant>
<vibrant application="application 3">
3
</vibrant>
";


preg_match_all( "/(<(vibrant+)[^>]*>)(.*)(<\/vibrant>)/i", $src, $matches );
print_r($matches);

what i need is a good solution to the greedy problem. when greedy it gets the wrong closing tag and therefore the wrong content. When greedy is disabled I get the first close tag which actually belongs to the second opening tag

I in the dark here, help is apriciated very much.

so the vibrant tags in the contentpart do not need to be found, since they will be iterated the next time round.

thx thx



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

Reply via email to