'Replacing portion of a URL in HPE UFT / VBscript

So I am trying to get a script to work that will obtain the current URL of the open tab, replace a portion of the URL, and enter in/navigate to the new URL which has the replaced text.

I'm struggling with the replace function as well as how to launch the edited URL in the current tab.

Here a rough idea of how I think it should look. If this worked worked it would open up a new browser with the new URL but I'd like it to be on the tab I'm currently in.

Would I need to crate an object for the result of the replace function?

If I were currently at

abc123.UZ.com/xaxsxa

I'd like to go to the page

xyz789.UZ.com/xaxsxa

Code:

 Browser("Edge").Page("Loan#").WebButton("LoanConditions").Click
 Browser("Edge").Page("Loan#).GetROProperty("url") 
 Result = Browser("Edge").Page("Loan#").GetROProperty("url")
 replace (Result,"abc123","xyz789")
 Systemutil.Run "Chrome.exe", "Result"


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source