in advance.
Kind Regards,
BlackDex
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?
Simply sad...
while <.*?> do { parse the contents of that tag in someway and change it? }
Becouse i think it is imposible with RegEx alone to make it so that it can
handle every attribute within a tag.
Ltrz BlackDex
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Eli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Eli wrote:
>>
>> Try:
>>
>> preg_replace('/(?<=\<)([^>]*)(\w+)=(?\s]+)(?=\s|\>)([^<]*)(?=\>)/U','\1\2="\3"\4',$html);
>> Hmm.. that could be a
>> start.. and don't ask me how it works... :P
>
> Well.. problem with that, is that
Thx... it works almost :P
I Changed the code a bit so you can see the results quicker :).
It doesn't change every attribute/value. I think this has to do something
with the opening and closing of a tag <>.
My code:
---
http://www.php.net/index.php> key=value ";
echo 'Normal HTML:';
echo $html;
"Jason Petersen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 10 Mar 2005 00:18:05 +0100, BlackDex <[EMAIL PROTECTED]> wrote:
>> Hello ppl,
>>
>> I have a question about regex and html parsing.
>>
>> I have the f
Owkay.. i fixed it :).
Here is the final code.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ml;
echo "";
$improved_html = preg_replace('/\<(.*)\>/Ueis','"<".tag_rep("\1").">"',$html);
echo 'Improved HTML:';
echo str_replace("\\'","'",$improved_html);
echo "";
?>
---
&
Try to put this at top.
!/usr/local/bin/php
so change the # for a !, becous thas is what is used to execute scripts etc..
:).
Hoop it will work.
Kind Regards,
BlackDex
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi! I'm trying to r
I have a litle problem with replaceing a string in some HTML code.
the html code is:
---
---
I want to change the "01%20-%20Raptor%20AMD%20Sempron_image001.jpg" becouse
the location of the file will be changed after the upload.
the location for instains will be
"/images/uploaded/01%20-%20Rapt
9 matches
Mail list logo