I am working in angular2 I have a URL link,eg:-www.abcd.com/Computers_Accessories/panache-air-pc/P-coac-20620024815-cat-z.html#newId=P-coac-41130779424?trackId=paym&subTrackId=&infitag=1234
I need to cut the portion #newId=P-coac-41130779424 from the above URL and append it to the end of the URL , so that the new required Url looks like:- www.abcd.com/Computers_Accessories/panache-air-pc/P-coac-20620024815-cat-z.html?trackId=paym&subTrackId=&infitag=1234#newId=P-coac-41130779424 is there any method to apply Regex in typescript to get this result, or else any other proper method to achieve this