Js string replacement problem

want to do a click to jump to the js method of url.

clipboard.png

Click submit, take the values of the two input, and
replace the last two zeros with the string var str= "http://www.baidu.com/loupan_0_0_0_0_0_0_0_0_0_0.html"
, which is spliced into
" http://www.baidu.com/loupan_0_0_0_0_0_0_0_0_1000_20000.html"

.

function replace(str, minPrice, maxPrice){
    return str.replace(/^http:\/\/www.baidu.com\/loupan((_[0-9]+){8})_([0-9]+)_([0-9]+).html$/, `http://www.baidu.com/loupan$1_${minPrice || 0}_${maxPrice || 0}.html`)
}

test:
clipboard.png


var str="http://www.baidu.com/loupan_0_0_0_0_0_0_0_0_0_0.html";
str.replace(/\d_\d(?=\.html)/,"1000_20000");
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eace2e-210d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eace2e-210d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?