1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <%
function remplace(txt)
Dim temp, regEx
temp = txt
Set regEx = New RegExp
regEx.IgnoreCase = False
regEx.Global = true
regEx.Pattern = "\[url\](.*?)\[/url\]"
temp = regEx.replace(temp,"<a href ='http://$1' target=""_blank"" & title='$1'>$1</a>")
regEx.Pattern = "\[email\](.*?)\[/email\]"
temp = regEx.REPLACE(temp,"<a href='mailto:$1'>$1</a>")
temp = replace(temp,VbCrLf,"<br />")
temp = Replace(temp, "[gras]", "<strong>")
temp = Replace(temp, "[/gras]", "</strong>")
temp = Replace(temp, "[italic]", "<em>")
temp = Replace(temp, "[/italic]", "</em>")
remplace = temp
Set regEx = Nothing
end function
%> |