[PHP] preg_replace with rawurlencoded?

2005-03-18 Thread BlackDex
I have a litle problem with replaceing a string in some HTML code. the html code is: --- img width=240 height=180 src=01%20-%20Raptor%20AMD%20Sempron_image001.jpg --- I want to change the 01%20-%20Raptor%20AMD%20Sempron_image001.jpg becouse the location of the file will be changed after the

[PHP] Re: Tried to run PHP as shell script and got the error...

2005-03-11 Thread BlackDex
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 run PHP as a shell script but I

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
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

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
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 if you got more

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
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: --- ?php function tag_rep($tag) { return

Re: [PHP] PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
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 following code: --- p class=MsoNormalfont size=3 face=Comic Sans MSspan

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
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

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
; $improved_html = preg_replace('/\(.*)\/Ueis','.tag_rep(\1).',$html); echo 'Improved HTML:brtextarea cols=70 rows=10'; echo str_replace(\\',',$improved_html); echo /textarea; ? --- BlackDex [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thx... it works almost :P I Changed the code a bit so you

[PHP] PHP RegExp and HTML tags attributes values etc...

2005-03-09 Thread BlackDex
=MsoNormalfont size=3 face=Comic Sans MSspan lang=NL style='font-size:12.0pt;font-family:Comic Sans MS'nbsp;/span/font/p --- So it will have around the attribute values... But i can't figure out how to do that :(. Can anyone help me with this?? Thx in advance. Kind Regards, BlackDex -- PHP General Mailing