日期:2014-05-16 浏览次数:20320 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <script> alert("----------------------p56434--------------------------".replace(/(-+)p([0-9]+)(-+)/g,"----p$2----")); </script> </BODY> </HTML>
------解决方案--------------------
-+[pP]([1-9]\d{0,2}|1000)-+ 替换成 ----P$1----
------解决方案--------------------
alert("-P5434------".replace(/(-+)([p|P](\d+))(-+)/,"----$2----"));
------解决方案--------------------
try:
/-+p\d{1,4}-+/i