Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 7, 2006, 5:20 pm
rate this thread
I tried this preg_replace('/^.*\n/', '',$body) but it only removed the
start of document-> Content-Type: text/plain
remove up to here ->This is the body of the document asdfdsafasdf
Re: regex help
It matches up to the first line-feed character. You want it to match
up to the first occurrence of two consecutive line-feeds (the first two
consecutive carriage-return/line-feed pairs, \r\n\r\n, perhaps?).
Remember the s modifier so that the dot matches any single line-feeds.
- » Parse error: syntax error, unexpected $end in ... Question/Suggestion
- — Previous thread in » PHP Scripting Forum