Re: Reg. Exp. Help

From: Date: Tue, 13 Feb 2001 13:52:07 +0000
Subject: Re: Reg. Exp. Help
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-39409@lists.php.net to get a copy of this message
On Tuesday 13 February 2001 04:59, Scott Mebberson wrote: > I think that maybe preg_match() or preg_match_all() is the answer but I > have know idea on how to make the regular expression I am using perl > comptaible. > > Here it is: > $txt = ereg_replace("src=\"([^>]+)\.(gif|jpg)\"", > "src=\"http://www.ezigraphics.com/images/about_0001." ¼ > ¨š5ÿvÊ" ËÚ . //2. "\"", > $txt); $txt = preg_replace ('/src="([^>]+)\.(gif|jpg)"/', 'src="http://www.ezigraphics.com/images/about_0001.\\2"', $txt); Wasn't too hard, was it? :-) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux)

« previous php.general (#39409) next »