PDA

Click to See Complete Forum and Search --> : Simple thing in PHP


lulzoralot
Jul 14th, 2009, 05:41 PM
Hey thanks for reading this :)


I want to extract data between two strings from source code of page.So like;


<b>Nanana: </b>Data<br>


So it should extract just Data from this string.I bet it can be done using RegEx but I am having huge problems with it so if anyone could share working example how could i do it.


Thx

lulzoralot
Jul 14th, 2009, 06:38 PM
Okay figured it out myself :)


function lol($start, $end, $str)
{
$split1 = explode($start, $str);
$out = str_replace($end, '', $split1[1]);
}

If anyone figures is out how to do with regex please let me know :)

manavo11
Jul 23rd, 2009, 08:42 AM
The regular expression would be something like this:

#</b>(.+)<br>#