The url being replaced looks like this:
/profile/something/
with something
being dynamic but profile
should always be in the url. I tried '/\w+/g'
as the first argument in replace(), but it did this instead:
/hello123/hello123/
instead of:
/profile/hello123/
Does anyone know how I can use the replace() only after a certain index of the url string? Or maybe replace every character except the first instance of profile
?