JSFiddle - React, Tailwind, and code Playground
by Sahin Deniz
JavaScript
RegExp.prototype.toJSON = RegExp.prototype.toString;
// sample
var foo = { rgx: /-[^\/?]+/, date: new Date() }
console.log(JSON.stringify(foo));
let id= ("https://eodev.com/profil/SeahinDeniz-5234138?deneme").replace(foo.rgx, "");
let id2= ("https://eodev.com/profil/SeahinDeniz-5234138?deneme").replace(/-[^\/?]+/, "");
console.log("1:",id);
console.log("2:",id2);