I really need help with this.
I have written a regular expression that searches for any occurance of
src="*" in a html page and rewrites it so that it is equal to
src="http://www.whereever.com/images/filename.jpg" -
If there are five occurances of this match then it replaces them all. Is
there anyway to make it only run once. Then if I want to loop and do it
again. I want to do this so I can put the contents of the original * in
src="*" into and array and access them later for uploading the files.
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." . //2. "\"", $txt);
Any ideas is a huge help - thankyou
Thanks
Scott Mebberson
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]