-3
我想從這個URL中除去5位數字以外的所有東西。帶數字的正則表達式字符串javascript
我有這個[^\d]
但它並沒有從ks1
去除1。
URL:
/teaching-resources/primary-40069/ks1-maths-41582/understanding-shape-and-space-41616/position-and-direction-41619/
預期輸出
40069 41582 41616
實際輸出(付費注意要到不希望的初始在141582
):
40069 141582 41616
'[^ \ d] +'是你所需要的 – vks