我試圖匹配模式:正則表達式匹配的數值
show_clipping.php?CLIP_id=*
從:
a href="javascript:void(0);" onclick="MM_openBrWindow('show_clipping.php?CLIP_id=575','news','scrollbars=yes,resizable=yes,width=500,height=400,left=100,top=60')">some text</a>
其中
*
可以只有數字值(例如:0 ,1,1234)
結果必須返回整體事情(show_clipping.php?CLIP_id=575
)
我已經試過:
show_clipping.php\?CLIP_id=([1-9]|[1-9][0-9]|[1-9][0-9][0-9])
,但我嘗試將截斷的575數字的休息,留下的結果,如:
show_clipping.php?CLIP_id=5
- 怎麼辦我正確匹配數字部分?
- 另一個問題是,價值575可以包含任何數值,我正則表達式不會後3位工作,我如何使它與
我可以限制結果只有第一組? – tom91136
是的,查看更新。 –