Jump to content

Simple PHP help needed


champrock

Recommended Posts

hi

 

i have some raw data from which i ned to extract some useful pieces..

 

data is in this form

 <Date>2008-05-07 22:57:18</Date> 
  <Timestamp>23123123213</Timestamp> 
  <Link>[b] I WANT TO EXTRACT THIS 1[/b] </Link> 
  <Category id="12">Other</Category> 
  <User>EXAMPLE</User> 

<Date>2008-05-07 22:57:18</Date> 
  <Timestamp>23123123213</Timestamp> 
   <Link>[b] I WANT TO EXTRACT THIS 2[/b] </Link> 
  <Category id="12">Other</Category> 
  <User>EXAMPLE</User> 

<Date>2008-05-07 22:57:18</Date> 
  <Timestamp>23123123213</Timestamp> 
  <Link>[b] I WANT TO EXTRACT THIS 3[/b] </Link> 
  <Category id="12">Other</Category> 
  <User>EXAMPLE</User> 

 

 

i want to extract all instances of "I WANT TO EXTRACT THIS" 

 

PLease suggest what regex do  i use? I am trying to do this with preg_match_all? Is this right?

 

Link to comment
https://forums.phpfreaks.com/topic/104673-simple-php-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.