solarisuser Posted August 1, 2006 Share Posted August 1, 2006 Hello All!I have a comma delimited file and I want to remove the start of the line until it hits the first comma.For example:23-28331,Blah,Blah Blah, Blah27-442-9,Blah2, Blahhhh, Blah Blah BlahI would like to end up with:Blah, Blah Blah, BlahBlah2, Blahhhh, Blah Blah BlahShould I look into preg_replace, split, or something else?Any ideas or code would be greatly appriciated! Link to comment https://forums.phpfreaks.com/topic/16176-manipulate-a-csv-file/ Share on other sites More sharing options...
shoz Posted August 1, 2006 Share Posted August 1, 2006 [code]<?php$string = <<<LLL23-28331,Blah,Blah Blah, Blah27-442-9,Blah2, Blahhhh, Blah Blah BlahLLL;$string = preg_replace('/^[^,]*,/m', '', $string);echo $string?>[/code] Link to comment https://forums.phpfreaks.com/topic/16176-manipulate-a-csv-file/#findComment-66875 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.