a regular expression problem - split text

From: Date: Mon, 20 Jan 2003 19:11:55 +0000
Subject: a regular expression problem - split text
Groups: php.general 
Request: Send a blank email to php-general+get-132309@lists.php.net to get a copy of this message
Hi all I am sorry for the very simple question but I can't doing this. I have a text like this: $text=" <!-- 1 --> this is January <!-- 2 --> this is February <!-- 3 --> this is March <!-- 4 --> this is April "; OK.. i want to show e.g. "this is January" in my var $sub_text. How can i doing this using a regular expressions? <?php ereg("(help-me-with-a-regulars-expressions-sentence)",text,$sub_text); echo $sub_text[0]; ?> thanks a lot ________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl>

« previous php.general (#132309) next »