<script language="VBScript"> dim txttxt="http:\\www163.comdfdfd<a href=http:\\www.63.com><a>" set re=new RegExp re.IgnoreCase=false re.Global=false re.Pattern="(http:\\\\)" dim test1 set matches = re.Execute(txt)for i = 0 to matches.count msgbox matches(i).value next </script>
dim txttxt="http:\\www163.comdfdfd<a href=http:\\www.63.com><a>"
set re=new RegExp
re.IgnoreCase=false
re.Global=false
re.Pattern="(http:\\\\)"
dim test1
set matches = re.Execute(txt)for i = 0 to matches.count
msgbox matches(i).value
next
</script>
var re = /([^>='"])((?:http|https|ftp|rtsp|mms):\/\/[\w\-\.,\?!%\*\#:;~\\&$@\/=\+\(\)]+)([^<'"])/gi;
str = str.replace(re, function ($0, $1, $2, $3)
{
return $1 + txt.replace(/(?:{url}|{text})/gi, $2) + $3;
}
);