Page 1 of 1

preg_match_all question

Posted: Thu Nov 25, 2010 1:33 am
by php_PGP
Hi

i can't make a good pattern to get each Text1 and Text 2 Separately in matches[1] array , i mean $matches[1][0]=Text1 and $matches[1][1]=Text2
with the pattern i'm using , i get The whole text between first ((Ex)) and last ((/Ex))
i know it's easy but i'm beginner

Code: Select all

((Ex))
Text1 
((/Ex))
Other Text
((Ex))
Text2
((/Ex))
Pls Help me
Thanx