RegexExtract to remove url query string

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

Based on these two URLs, I would only like to return

Hi @AndyMB
For reference:
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: