Can someone write a javascript code that replace
"www.mydomain.com/happy_new_year/yeah-00-14-jj-78-aaa1.html"
to
"www.mydomain.com/happy_new_year/ohoh-11-22-33-44-aaa1.html"
Note that the folder in this case /happy_new_year/ will stay the same.
But we don't know the exact folder name, could be something else, and sometimes no folder is present, and don't need to change.
Replace every character after that except the last 4 characters before .html
There is a pattern of how many slashes '-' could be useful.
Thanks