Asp,vbs is turning in the article paragraph backward plus URL and other content _ Application skills
Source: Internet
Author: User
<script language = "vbs" >
' Function name: regexptest
' Parameters: strng--' The string to be processed; patrn--to | A variety of trailing signs such as:<br/>|</p>|<br>; patrn2--"to be replaced by a string, also to | separate
Open
' Author: Liu YONGFA (yongfa365) ' Blog
' function: Add the contents of patrn2 in the STRNG string followed by the patrn end character
Function regexptest (strng, PATRN, patrn2)
Dim regEx, Match, matches ' Set variable.
Set regEx =new RegExp ' establishes regular expressions.
Regex.ignorecase =true ' Sets whether to differentiate character case.
Regex.global =true ' Sets global availability.
PATRN = Split (patrn, "|")
ForEach p in Patrn
Regex.pattern = P ' Set mode.
Strng = Regex.Replace (strng, "| |") & Chr (Ten) & P)
Next
Strng = Split (strng, "| |")
ForEach E in Strng
s = s + E + arrart (patrn2)
Next
Regexptest = S
Endfunction
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.