Yazılım Geliştirme Uzmanı & E-Ticaret Danışmanı
Asp , Excel , VBA , E-Ticaret , Mobil , Desktop, Web Uygulamaları
Tel : 0 534 797 31 21 , Mail : baranseren@gmail.com
Function CreateURL(Text)

Function CreateURL(Text) 3.4.2011 13:09:07

Yazıda bulunan url leri link`e çevirmek için regular expressions ile hazırlanmış fonksiyon.
	Function CreateURL(Text)
		Set regEx = New RegExp
			With regEx
				.IgnoreCase = True
				.Global 	= True
				.Pattern 	= "\[url=((http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}?/?[a-zA-Z0-9\-\._\?\,\`/\\\+&%\$#\=~]*)\](\s*[a-zA-Z]+((.|\n)*?)\s*)\[\/url\]"
			End With
		Set objEx = regEx.Execute(Text)

			For Each x In objEx
				Text = Replace(Text,x,""& Trim(x.SubMatches(2)) &"", 1,-1,1)
			Next
		CreateURL = Text
	End Function



Tags :