Re: ereg et all - new question..

From: Date: Thu, 31 Jan 2002 22:23:10 +0000
Subject: Re: ereg et all - new question..
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-83010@lists.php.net to get a copy of this message
Wow, thanks a lot... although it should be \\0 here... didn't see anything in the manual about the \\ maybe gotta look for it again :-) Thanks, Edward ----- Original Message ----- From: "Richard Crawford" <rscrawford@mossroot.com> To: "Edward van Bilderbeek - Bean IT" <edward@bean-it.nl> Cc: <php-general@lists.php.net> Sent: Thursday, January 31, 2002 11:20 PM Subject: Re: [PHP] ereg et all - new question.. > 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" <sheltren@home.com> > > To: "Edward van Bilderbeek - Bean IT" <edward@bean-it.nl>; > > <php-general@lists.php.net> > > 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" <sheltren@home.com> > > > >To: "Edward van Bilderbeek - Bean IT" <edward@bean-it.nl>; > > > ><php-general@lists.php.net> > > > >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: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > >

« previous php.general (#83010) next »