Remove Parameters from URLs

I’m trying to group page path URLs from Google Analytics in Sigma, bur parameters in the url are creating hundreds of unique values becasue of campaigns, channels and, unique submission IDs.

All URLs parameters start with “?” so I would like to clear anything after that character. What is the best text formula to achieve that.

Example: I would like to turn this:
/blog/7-questions-to-ask-when-evaluating-business-intelligence-software-full/?BI Evaluation Questions=&_hsmi=89066079&_hsenc=p2ANqtz-83hSWpBTZyKO7SPmwoFo9Arye4ol-a1dMlCkoQTIG1lO2jyKj3pHoOPNvECgV3KmVUe_7C7PB9Jbsg_5Zqo5FaemGgag

Into this:

/blog/7-questions-to-ask-when-evaluating-business-intelligence-software-full/