ASP, vbs regular rotation adds the URL, website name, website introduction and other content after the article paragraph <script language =vbs>
'Function name: RegExpTest
'Parameters: strng--"The string to be processed; patrn--"Various ending marks separated by |, such as: <br/>|</p>|<br>; patrn2--"To be replaced with String, also separated by |
open
'Author: Liu Yongfa (yongfa365)'Blog
'Function: Randomly add the content in patrn2 after the character ending with patrn in the strng string
Function RegExpTest(strng, patrn, patrn2)
Dim regEx, Match, Matches 'Create variables.
Set regEx =New RegExp ' Create a regular expression.
regEx.IgnoreCase =True' sets whether characters are case-sensitive.
regEx.Global =True' sets global availability.
patrn = Split(patrn,|)
ForEach p in patrn
regEx.Pattern = p 'Set pattern.
strng = regEx.Replace(strng,||& Chr(10)& p)
Next
strng = Split(strng,||)
ForEach E in strng
s = s + E + arrArt(patrn2)
Next
RegExpTest = s
EndFunction
Function arrArt(patrn2)
arrArti = Split(patrn2,|)
Randomize
arrArt = arrArti(CInt(UBound(arrArti)* Rnd))
EndFunction
strng =111<br/>222</p>333<br/>444</p>555<Br>666</P>111
Source = strng
patrn =<br/>|</p>|<br>
patrn2 =www.xiaoshuo8.net|http://www.vevb.com/blog|hi.baidu.com/
words = RegExpTest(strng, patrn, patrn2)
MsgBox(words)
</script>
<script>
document.Write <fieldset><legend>Original string</legend>+ Source +</fieldset><br>
document.Write <fieldset><legend>Converted string</legend>+ words +</fieldset><br>
</script>