note 90230 modified in function.mb-ereg by danbrown

From: Date: Sat, 11 Apr 2009 15:11:25 +0000
Subject: note 90230 modified in function.mb-ereg by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153083@lists.php.net to get a copy of this message
Hebrew regex tested on PHP 5, Ubuntu 8.04. Seems to work fine without the mb_regex_encoding lines (commented out). Didn't seem to work with \uxxxx (also commented out). <?php echo "Line "; //mb_regex_encoding("ISO-8859-8"); //if(mb_ereg(".*([\u05d0-\u05ea]).*", $this->current_line)) if(mb_ereg(".*([א-ת]).*", $this->current_line)) { echo "has"; } else { echo "doesn't have"; } echo " Hebrew characters.<br>"; //mb_regex_encoding("UTF-8"); ?> --was-- Hebrew regex tested on PHP 5, Ubuntu 8.04. Seems to work fine without the mb_regex_encoding lines (commented out). Didn't seem to work with \uxxxx (also commented out). echo "Line "; //mb_regex_encoding("ISO-8859-8"); //if(mb_ereg(".*([\u05d0-\u05ea]).*", $this->current_line)) if(mb_ereg(".*([א-ת]).*", $this->current_line)) { echo "has"; } else { echo "doesn't have"; } echo " Hebrew characters.<br>"; //mb_regex_encoding("UTF-8"); http://php.net/manual/en/function.mb-ereg.php

« previous php.notes (#153083) next »