<script type="text/javascript">
var sUrl = 'http://www.google.com/u/1231234http://www.google.com/u/1231235http://www.google.com/u/1231236http://www.google.com/u/1231237http://www.google.com/u/1231238http://www.google.com/u/1231239';var aUrl = sUrl.split('http://');
aUrl.shift();alert(aUrl.join('\n'));
</script>

解决方案 »

  1.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <script>
        var a=/http\:\/\/www\.google\.com\/u\/\d{7}/g;
    var b="http://www.google.com/u/1231234http://www.google.com/u/1231235http://www.google.com/u/1231236http://www.google.com/u/1231237http://www.google.com/u/1231238http://www.google.com/u/1231239";
    var c=b.match(a);
    for(i=0;i<c.length;i++)
    {
    alert(b.match(a)[i]);
    }
        </script>
        
        </div>
        </form>
    </body>
    </html>
      

  2.   

    没做过,一般都是取到url记录串后,利用是否是http对字符串截取分离的,期待正则中!