|||Antonidas - H ||| 0.21 || 3000 || 正常| c |
||Blackhand - A || 0.15 | 5000 | 正常|| a |||
||Destromath - H || 0.12 | 2000 | 关闭|| h |||通过查找Antonidas - H / Destromath - A / Destromath - H
判断是[正常]二个字得到 这段中得到二个值
0.21和3000
0.15和5000
判断是[关闭] 不理会~~

解决方案 »

  1.   

    <script type="text/javascript">
    window.onload = function()
    {
    var s="¦ ¦ ¦Antonidas   -   H   ¦ ¦ ¦   0.21   ¦ ¦   3000   ¦ ¦   正常 ¦   c   ¦";
    var re=/Antonidas   -   H.*正常|Blackhand   -   A.*正常|Destromath   -   H.*正常/;
    var s1=re.exec(s);
    if (s1==null)
    {
    document.writeln("不干啥");
    }
    else
    {
    var re2=/[\d\.]+/g;
    s2_a=re2.exec(s1);
    s2_b=re2.exec(s1);
    document.writeln(s2_a+"和"+s2_b);
    }
    }
    </script>
    调式输出   0.21和3000