Techwarelabs Community

Techwarelabs Community (https://www.techwarelabs.com/community/index.php)
-   General Board (https://www.techwarelabs.com/community/forumdisplay.php?f=7)
-   -   Auto-linking Problems Fixed! (https://www.techwarelabs.com/community/showthread.php?t=273)

Keefe 12-31-2001 02:59 AM

Auto-linking Problems Fixed!
 
I would just link to let everyone know that I think I have fixed all the autolinking problems.  There should be no more spaces and random
's in the links.

:)

For anyone who wants the exact details, its involed replacing...

Code:

     if( $autolinkurls ) {
            $message =~ s~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\.\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1$2~isg;
            $message =~ s~([^\"\=\[\]/\:\.]|[\n\b]|\A)\\*(www\.[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\.\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1$2~isg;
      }

With...
Code:

     if( $autolinkurls ) {
            $message =~ s~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1$2~isg;
            $message =~ s~([^\"\=\[\]/\:\.(\://\w+)]|[\n\b]|\A)\\*(www\.[^\.][\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1$2~isg;
      }


Uranium-235 12-31-2001 03:16 AM

Re: Auto-linking Problems Fixed!
 
dat perl?

Simo 12-31-2001 07:38 AM

Re: Auto-linking Problems Fixed!
 
It sure is.

Aint it pretty?


All times are GMT -5. The time now is 05:56 PM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.