Jump to content

Cut out info from HTML source


Gruzin

Recommended Posts

Hi guys,

 

I have a HTML file with some data in it, say rental info. I need to "cut out" (pull out) the info from one topic (Rent) to another. Is that possible with php?

 

P.S I have attached sample HTML file.

 

Any help will be greatly appreciated,

 

George

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/40334-cut-out-info-from-html-source/
Share on other sites

if (preg_match('/a[^b]*?b/', $subject)) {

} else {

}

 

try that.

 

This is lazy matching (google regex lazy match) so it'll match twice in the following:

 

acccccbacccccb

 

BTW http://www.phpfreaks.com/forums/index.php/board,43.0.html

 

monk.e.boy

 

 

if (preg_match('/a[^b]*?b/', $subject)) {

} else {

}

 

try that.

 

This is lazy matching (google regex lazy match) so it'll match twice in the following:

 

acccccbacccccb

 

BTW http://www.phpfreaks.com/forums/index.php/board,43.0.html

 

monk.e.boy

 

 

 

Thanks monk.e.boy,

 

I'm gonna look at it  ;)

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.