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! Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.