Our website would like to use cookies to store information on your computer. You may delete and block all cookies from this site, but parts of the site will not work as a result. Find out more about how we use cookies.

Login or Register

Powered by
Powered by Novacaster
 
regex assistance
by Graham Freeman at 18:35 08/06/07 (Forum::Technical Advice::General)
Ages since I've used regex for more than single character matching ...
Hi all,

I have a really long string called $html which contains a whole web page from which I want to grab some info.

The format is sort of like this:

================
blahblahblah
info-1
info-2
info-3
tum-te-tum-te-tum
info-4
info-5
foobarfoobar
================

I want 2 arrays - one array that contains the info-n between blahblah and tum-te-tum, and another array that contains the info-n between tum-te-tum and foobar.

Can a master of regex show me how this is done please?!

It's PHP but that shouldn't matter much.

Thanks!!
--
gfreeman

<< scp, sftp, etc... Anyone know of a solution to >>
View Comments (Flat Mode) Printer Version
regex assistance Graham Freeman - 8/06
    Re: regex assistance Graham Freeman - 8/06
       Re: regex assistance Hugo van der Sanden - 10/06
    Re: regex assistance Bruce Ure - 8/06
       Re: regex assistance Graham Freeman - 8/06