untested:
preq_replace('/\[\*\]([^(\[\*\])(\/ul)]*)/i','li$1/li',$text);
Jens Lehmann wrote:
Hi out there,
I encountered a lot of problems while trying to convert a list
in Forum-Code (like UBB-Code).
[list]
[*] item 1
[*] item 2
[*] item 3
[/list]
should be converted to
ul
liitem 1/li
That's what I thought, too. But it doesn't work.
test.php:
$text = 'ul [*] jusfj [*] ijusnf [*] jsf [*] jusdf /ul';
$text = preg_replace('/\[\*\]([^(\[\*\])(\/ul)]*)/i','li$1/li',$text);
$text = htmlentities($text);
Output:
ul li j/liusfj li ij/liusnf li jsf /lili j/liusdf /ul
I tested some
At 17:19 09.11.2002, Jens Lehmann said:
[snip]
Hi out there,
I encountered a lot of problems while trying to convert a list
in Forum-Code (like UBB-Code).
[list]
[*] item 1
[*] item 2
[*] item 3
[/list]
should be converted to
ul
liitem 1/li
liitem 2/li
3 matches
Mail list logo