You want to say that you have this format in your document, and you just want to get the http part? you can just split the delimiter "=" without regex
$f = fopen("file","r");
if ($f){
while( !feof($f) ){
$line = fgets($f,4096);
$s = explode(" = ",$line);
$s = preg_replace("/\"/","",$s);
print $s[1];
}
fclose($f);
}
on the command line:
#php5 myscript.php > newfile.ext
If you use languages other than PHP, there is a similar line-splitting method that you can use. e.g. Python / Perl split (). read your document to find out
source
share