Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
ASP Category Code
Real Name
:
Mustafa Agâh Öztürk
Subject
:
Otomatik Link Oluşturma
Description
:
Forumlardaki otomatik link oluşturma işlemini gerçekleştirir.
'// Copyright (c) 2000, Lewis Moten (modified by Ferruh Mavituna). All rights reserved. Function LinkURLs(ByVal asContent) Dim loRegExp' Regular Expression Object (Requires vbScript 5.0 and above) ' If no content was received, exit the function If asContent = "" Then Exit Function 'asContent=asContent&" " Set loRegExp = New RegExp loRegExp.Global = True loRegExp.IgnoreCase = True '//-- by Ferruh Mavituna {http://ferruh.mavituna.com} '1/29/2004 '"www" added '"www." fixed '"www" fixed etc. loRegExp.Pattern = "((((ht|f)tps?://)|www\.)\S+[^\.*](\s)?)" 'loRegExp.Pattern = "((((ht|f)tps?://)|www\.)\S+[^\.*]\s)" 'loRegExp.Pattern = "((((ht|f)tps?://)|(www\.))\S+[/]?[^\.*]\s)" ' Link URLs LinkURLs = loRegExp.Replace(asContent, "<a href=""$1"">$1</a>") ' // -- ' Look for email addresses loRegExp.Pattern = "(\S+@\S+.\.\S\S\S?)" ' Link email addresses LinkURLs = loRegExp.Replace(LinkURLs, "<a href=""mailto:$1"">$1</a>") ' Release regular expression object Set loRegExp = Nothing End Function
Rating
:
5.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks