$retest = substr($linewithsubjectin,3); if ($retest ne "Re:") { # hasn't got Re: in } else { # has got Re: in } should work.
dan "Gavin Laking" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi folks, > > I've configured the forum software I am writing to automatically add the > line 'Re: subjectNameHere' to the subject field when a user wishes to > reply to a post. Now I've encountered a problem, when the reply is a > reply to a previous reply: > > * How do I start X? > * Re: How do I start X? > *Re: Re: How do I start X? > > Is there a way I can search for more than one instance of 'Re:' and > delete all but one, or would it be faster to search for one or more > instances of 'Re:' and delete them all and then just add one instance? > > GL > > - -- > Gavin Laking - Web Development Daemon > > http://www.gavinlaking.co.uk > - -- > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE93334aMak7Ylvm3ARAhmbAJ9JULux7WLfLKSHVFK3hyZuaGa3gQCgpabF > TGrFO2NjDPXqfoZ73z2McFQ= > =25x6 > -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]