ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] Re: case-insensitive str_replace
by Philip Olson other posts by this author
May 2 2002 10:21PM messages near this date
Re: [PHP] Re: case-insensitive str_replace | [PHP] Re: case-insensitive str_replace
This is a feature request, see:

  stri_replace() to compliment str_replace() :
  --------------------------------------------
  http://bugs.php.net/bug.php?id=5919

Regards,
Philip Olson


On Thu, 2 May 2002, CC Zona wrote:

>  In article <GVI5RV00.CF8@[...].edu>,
>   reubendb@[...].edu (Reuben D Budiardja) wrote:
>  
>  > On Thursday 02 May 2002 04:08 pm, J Smith wrote:
>  > > preg_replace() can be used with arrays.
>  > 
>  > Yeah, but how to make it case-insensitive beside changing the my search and 
>  > replace strings to a regular expression? The problem is that I have a big 
>  > array for search and replace, and it would be most labourious to change them 
>  > to reg exp.
>  
>  It shouldn't be laborious, if the array's values were--as you 
>  implied--compatible with str_replace.  You're replacing an array of 
>  straight string values, correct?  So just escape the regex special values 
>  (preg_quotes()) in each while you're looping through the array to add the 
>  pattern delimiters and "i" modifier.  Then pass that array to preg_replace.
>  
>  -- 
>  CC
>  
>  -- 
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>  


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Reuben D Budiardja
J Smith
Reuben D Budiardja
CC Zona
Philip Olson
CC Zona
Mike Eheler

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved