RegexExtract to remove url query string

Using RegexExtract in Metabase, is it possible to remove the query string and fragment identifier?

http://www.google.com/page#rubbish
http://www.google.com/page?rubbish

Based on these two URLs, I would only like to return http://www.google.com/page

Hi @AndyMB
For reference: https://www.metabase.com/docs/latest/questions/query-builder/expressions/regexextract
Yes, this should do it: regexextract([field], "^([^?#]+)")

Yeah, I tried something similar to this, based on this regex pattern.

This, and yours, produce the same error

No method in multimethod '->honeysql' for dispatch value: [:sqlserver :regex-match-first]

@AndyMB Doesn't work on SQL Server:
https://www.metabase.com/docs/latest/questions/query-builder/expressions/regexextract#limitations