RE: [PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread Ray Hunter

Show some code...

Thanks,

Ray BigDog Hunter



-Original Message-
From: kras [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 19, 2002 9:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] regex: string begins with NEITER http NOR cid NOR mailto


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 (almost 3x24hrs;-)

Regards
Konrad

--
e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread kras

There you are
  $html = preg_replace ('href=(\|)(?!mailto)([.]*?[^\]*?)(\|
)'si, href=\.$bejsnejm.\\2\, $html);
  $html = preg_replace
('(src|background|href)=(\|)(?!http)([.]*?[^\]*?)(\| )'si,
\\1=\.$bejsnejm./\\3\, $html);

of course it fails.

kras

 Show some code...

 Thanks,

 Ray BigDog Hunter



 -Original Message-
 From: kras [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 19, 2002 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] regex: string begins with NEITER http NOR cid NOR mailto


 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 (almost 3x24hrs;-)

 Regards
 Konrad

 --
 e-mail: [EMAIL PROTECTED]




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php