regex problem
| From: | kras | Date: | Sat, 18 May 2002 10:51:30 +0000 |
| Subject: | regex problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19249@lists.php.net to get a copy of this message | ||
Hello!
I have got a big problem:
I have html content in $html variable, which contains href, src and
background tags. Those tags may contain relative adressess and absolute
addressess which begin with http(s): or cid: (mail inline attachements) and
mailto:
I have also variable $basewwwservername, which contains servername of
current server. I have to insert this $basewwwservername into all href,src
and background tags which are relative and NOT into absolute.
In other words I must preg_replace with some pattern that match for example
(src)=(\"|)..and not following WORDS: http|cid|mailto and correct rest of
string.
Does anybody relief my pain?;-)
I've lost at least 3 days (not 3x24hrs;-)
Regards
Konrad
------
e-mail: kras26@wp.pl