Special regular expression

From: Date: Wed, 06 Sep 2000 11:18:57 +0000
Subject: Special regular expression
Groups: php.general 
Request: Send a blank email to php-general+get-15490@lists.php.net to get a copy of this message
Hi All, I would like to split a string into a set of strings, using a different start and end delimiter. So, something like expode, but where I can say where it should start to split and where to and. Example: $unsplitted = "<html><body><? phpstuff ?></body></html>"; $splitted = desired_function("<?", "?>", $unsplitted"); This then should result in: $splitted[0] = "<html><body>" $splitted[1] = "<? phpstuff ?>" $splitted[2] = "</body></html>" So, any ideas or suggestions for desired_function()?? Maybe a fancy regular expression (or a simple one, my knowledge of regexs is quite lame :-)).. TIA, Dirk

« previous php.general (#15490) next »