日期:2014-05-16  浏览次数:20342 次

能用正则把前面的数字去掉怎么写?
16//   OF   ANY   KIND,   EITHER   EXPRESSED   OR   IMPLIED,   INCLUDING   BUT   NOT
    17//   LIMITED   TO   THE   IMPLIED   WARRANTIES   OF   MERCHANTABILITY   AND/OR
    18//   FITNESS   FOR   A   PARTICULAR   PURPOSE.
    19//==============================================================================
    20
    21using   System;
    22using   System.Data;
    23using   System.Xml;
    24using   System.Data.SqlClient;
    25using   System.Collections;


------解决方案--------------------
<script language=javascript>
var s= "16// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT ";
re=/^\d+/gi;
s=s.replace(re, " ");
alert(s);
</script>
------解决方案--------------------
/^\d+/gm

用 EmEditor 文本处理软件正则替换比较方便:^\d+

------解决方案--------------------
re=/\s*^\d+/gi;
------解决方案--------------------
re=/^\s*\d+/gi;