I have the above string I want to remove gsi along with the value. After removing gsi my string should look like given below.
Scenario 1
/product/Abrasives?gsi=1
Expected output
/product/Abrasives
Scenario 2
/product/Abrasives?query=search&gsi=1
Expected output /product/Abrasives?query=search
Scenario 3
/product/Abrasives?query=search&gsi=1&fname=abc
Expected output
/product/Abrasives?query=search&fname=abc