28,409
社区成员




Dim a,b,ma
a="岁月风云-国语字幕50集,岁月风云-国语字幕50,岁月风云-国语字幕05集,岁月风云-国语字幕50"
set ma=new regexp
ma.global=true
ma.pattern="[^\d]"
b=ma.replace(a,"") ' 结果:50500550
<%ss = "岁月风云-国语字幕10集,岁月风云-国语字幕20,岁月风云-国语字幕30集,岁月风云-国语字幕40"
Set re = New RegExp
re.Pattern = "([^\d]*)(\d+)([^\d]*)"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
rv = re.Replace(ss,"$2,")
response.Write rv%>
<%ss = "岁月风云-国语字幕10集,岁月风云-国语字幕20,岁月风云-国语字幕30集,岁月风云-国语字幕40"
Set re = New RegExp
re.Pattern = "([^\d]*)(\d)([^\d]*)"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
rv = re.Replace(ss,"$2,")
response.Write rv%>
<%ss = "岁月风云-国语字幕10集,岁月风云-国语字幕20,岁月风云-国语字幕30集,岁月风云-国语字幕40"
Set re = New RegExp
re.Pattern = "([^\d]*)\d([^\d]*)"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
rv = re.Replace(ss,"$1,")
response.Write rv%>
<script language="javascript">
function aa(x)
{
str1=x.replace(/\D/g," ")
document.write(str1)
}
</script>
<%
function GetNo(iGameID) '获得集数
szSQL = "SELECT FullPath FROM Prog_Server where Prog_ID=" & iGameID
Set rsData_RName = Server.CreateObject("ADODB.Recordset")
rsData_RName.Open szSQL,con,1,3
if not rsData_RName.EOF then
FullPath = rsData_RName("FullPath")
m = InStrRev(FullPath, "\")
FullPath = Right(FullPath, Len(FullPath) - m)
n = InStr(FullPath, ".")
FullPath = Left (FullPath, n-1)
End If
rsData_RName.Close
set rsData_RName = nothing
GetNo=str1
Response.Write " <script>aa('"&FullPath&"') </script>"
end function
%>
function GetNo(iGameID) '获得集数
szSQL = "SELECT FullPath FROM Prog_Server where Prog_ID=" & iGameID
Set rsData_RName = Server.CreateObject("ADODB.Recordset")
rsData_RName.Open szSQL,con,1,3
if not rsData_RName.EOF then
FullPath = rsData_RName("FullPath")
m = InStrRev(FullPath, "\")
FullPath = Right(FullPath, Len(FullPath) - m)
n = InStr(FullPath, ".")
FullPath = Left (FullPath, n-1)
End If
rsData_RName.Close
set rsData_RName = nothing
response.Write"<script language=""javascript"">"
response.Write"var str="&FullPath&""
response.Write"str1=str.replace(/\D/g,"""");"
response.Write "document.write(str1);"
response.Write"</script>"
GetNo=str1
end function