Re: Case insensitive str_replace

From: Date: Mon, 02 Apr 2001 15:06:29 +0000
Subject: Re: Case insensitive str_replace
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-6451@lists.php.net to get a copy of this message
I'm not sure where to put the /i. If I had code like: $print preg_replace("test", "this is a test", "test TEST tEsT TEst") where in that code would i put the modifier? -- Matt matthew.ralston@haltoncollege.ac.uk matthew@ralston.net < www.mralston.co.uk /> ""James Moore"" <jmoore@php.net> wrote in message news:PJEKIAAHHNOGHIGKKJFDCEMLDBAA.jmoore@php.net... > > > > > Does anyone know how to do a case insensitive str_replace? > > I don't want to alter the case of the original string (so I can't do a > > strtolower first). > > > > I've seen some functions used with the likes of [^Aa] in them but I'm not > > sure how to use this... > > Anyone got any ideas? > > use preg_replace with /i modifier. > > James > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#6451) next »