Sorry, that should be:

        eregi_replace("(this)","<b>\\1</b>",$str);



On Thu, 2002-01-31 at 14:20, Richard Crawford wrote:
> Seems like that makes it a LOT easier.
> 
> Use eregi_relace() instead of ereg_replace().  eregi allows for
> case-insensitivity.
> 
> Try
> 
>       eregi_replace("this","<b>\\1</b>",$str);
> 
> That should do it, though I haven't tried it myself.
> 
> 
> On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote:
> > Maybe I better ask my question different...
> > 
> > what i want to do is, to highlight certain text in a string...
> > 
> > for example: "This equals this equals tHis..." has to become:
> > "<b>This</b> equals <b>this</b> equals <b>tHis</b>"... so dispite the case,
> > the <b>'s should be put around it...
> > 
> > does that make it easier? not for me :-)
> > 
> > Greets,
> > 
> > Edward
> > 
> > 
> > ----- Original Message -----
> > From: "Jeff Sheltren" <[EMAIL PROTECTED]>
> > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Thursday, January 31, 2002 11:06 PM
> > Subject: Re: [PHP] ereg et all
> > 
> > 
> > > Ahhh, ok makes more sense now.  Although, I don't think that there is an
> > > "easy" way to do what you are asking.  I think that in order to accomplish
> > > that, you will have to specify all possible cases of a string, and have a
> > > ereg_replace() statement for each of them.
> > >
> > > Jeff
> > >
> > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
> > > >Oh, that was a typo... sorry...
> > > >
> > > >it should be:
> > > >
> > > >"This equals this equals tHis" -> "That equals that equals tHat"
> > > >
> > > >Edward
> > > >
> > > >----- Original Message -----
> > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]>
> > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>;
> > > ><[EMAIL PROTECTED]>
> > > >Sent: Thursday, January 31, 2002 10:56 PM
> > > >Subject: Re: [PHP] ereg et all
> > > >
> > > >
> > > > > I'm not sure why you wanted the last word "tHis" to be changed to
> > "That"
> > > > > (with a capital)... can you explain further?
> > > > >
> > > > > Jeff
> > >
> > >
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to