Re: [PHP] a regular expression problem - split text

2003-01-25 Thread George E. Papadakis
If I got this right : preg_match_all ("#\!.*?>(.*?)<#si",$string,$match); You will have an array ($match[1]) with all your subs in there. -- georgep - Original Message - From: "Juan Pablo Aqueveque" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 9:11 PM Subje

RE: [PHP] a regular expression problem - split text

2003-01-20 Thread John W. Holmes
> I have a text like this: > > $text=" this is January this is February > this is March 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? This seems to work. preg_match_all("/([a-z ]+)/i",$text,$matche