TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   preg_replace issue.. (http://www.talkphp.com/advanced-php-programming/3337-preg_replace-issue.html)

CHASE 09-09-2008 08:58 AM

preg_replace issue..
 
Okay.. so i'm trying to chop out the entire header of my document i'm reading.. but it just wont seem to do it.. any help?

$result = preg_replace("/<!doctype html><head>(.*)head>/", '', $result);

CHASE 09-09-2008 09:02 AM

Nevermind, got it to work

This is the code I used
$result = preg_replace("@<!doctype html><head>.*<\/head>@si", '', $result);


All times are GMT. The time now is 09:58 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0