AW: [PHP] reg-ex please

From: Date: Sat, 27 Apr 2002 11:25:31 +0000
Subject: AW: [PHP] reg-ex please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94881@lists.php.net to get a copy of this message
Try it like this : $code[$i] = ereg_replace("&#([0-9] {5});" , "\\1.bing" , $code[$i] ); -----Ursprüngliche Nachricht----- Von: John Fishworld [mailto:john@webital.de] Gesendet: Samstag, 27. April 2002 1:11 PM An: php-general@lists.php.net Betreff: [PHP] reg-ex please Help please from one of the reg-ex experts out there please ! I'm trying to find the pattern &#(5 number); example 𑃸 This works $code[$i] = ereg_replace("&#([0-9])+" , "replace\\0.bing" , $code[$i] ); and I get back replace 𑃸.bing but I also want to lose the &# and the ; so I get back 69880.bing At the moment I just re search and remove the like this $code[$i] = ereg_replace('&#','',$code[$i]); $code[$i] = ereg_replace(';','',$code[$i]); but I'm sure that theortetically I can do it in one step ! Can anyone help ! Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#94881) next »