note 38399 added to function.sql-regcase

From: Date: Fri, 19 Dec 2003 09:20:28 +0000
Subject: note 38399 added to function.sql-regcase
Groups: php.notes 
Request: Send a blank email to php-notes+get-62220@lists.php.net to get a copy of this message
if you want it to work with special characters like "ä", "ü" and "ö", just try this small fix: <?php // convert to regex style $regex = sql_regcase("Öffnung"); // before editing, output = Ö[Ff][Ff][Nn][Uu][Nn][Gg] // replace the "special" characters with regex style $regex = preg_replace("/([Öö])/","[Öö]",$regex); $regex = preg_replace("/([Ää])/","[Ää]",$regex); $regex = preg_replace("/([Üü])/","[Üü]",$regex); // after editing, output = [Öö][Ff][Ff][Nn][Uu][Nn][Gg] ?> finally a classical regex style is ready to be used. ---- Manual Page -- http://www.php.net/manual/en/function.sql-regcase.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38399 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38399&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38399&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62220) next »