Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Marek Kilimajer
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

Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Jens Lehmann
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

Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Ernest E Vogelsinger
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