RE: [PHP] remove first character in text file

From: Date: Wed, 24 Nov 2004 10:00:35 +0000
Subject: RE: [PHP] remove first character in text file
Groups: php.general 
Request: Send a blank email to php-general+get-202748@lists.php.net to get a copy of this message
<?php $email = '%user@domain.com%user@domain2.com%user@domain3.com'; $email = preg_replace('/^%%+/','%',$email); print "$email"; ?> -----Original Message----- From: Dustin Krysak [mailto:mailinglists@digitalcollision.com] Sent: 24 November 2004 09:53 To: PHP Subject: Re: [PHP] remove first character in text file Just want to add to this with a little more info.... my text file is a list of email addresses with a "%" separating them. For example: user@domain.com%user@domain2.com%user@domain3.com Now sometimes I end up with a "%" at the beginning. For example: %user@domain.com%user@domain2.com%user@domain3.com Or: %%user@domain.com%user@domain2.com%user@domain3.com Now that causes me issues else where in the script. So what I need to do is check if the "%" character exists at the beginning of the file and remove any if the "%" is there. ideas? d > >> Hi there.. I have a text file where I need to remove JUST the first >> character in the text file. Can anyone point me to a tutorial? >> >> d >> > ________________________________________________________________________ This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it ___

« previous php.general (#202748) next »