preg_match_all question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php_PGP
Forum Newbie
Posts: 1
Joined: Thu Nov 25, 2010 1:28 am

preg_match_all question

Post 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
Post Reply