JS regular matching

var a = "ww.abc.com/?page=11"
how do I regularly match all the characters before the 11 digits? And give it a new variable!

May.22,2021

'ww.abc.com/?page=11'.replace (/. * (? = 11) /,' ddd')


a.replace (/ (. +?) dhammer,'$1')


  1. if you are not familiar with your own rules, then I advise you not to use them, or you will have to ask again in case something goes wrong
  2. if the string is very stable, go straight to split ('?') , and then split ('=') to find
  3. .
  4. if the string is not very stable, I guess you probably can't write regular rules well. If you don't require compatibility with IE, you can use URL .
  5. it is recommended to learn the rules rather than go to the forum and ask
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-1eafa52-699e2.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-1eafa52-699e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?