Go does not support a positive lookahead (?=
.
To match the path if it does not start with data or http or https, one option is using an alternation first matching what you don't want and capture in group 1 what you want to keep.
url\((?:['"]?(?:https?|data):[^'"\)]+['"]?|['"]?([^'")]+)['"]?)\)
In parts
url\(
Match url(
(?:
Non capturing group
['"]?
Optional quote
(?:https?|data):
Match http, https or data.
[^'"\)]+
Match 1+ times any char except '
, "
or )
['"]?
Optional quote
|
Or
['"]?
Optional quote
([^'")]+)
Capture group 1, matching 1+ times any char except '
, "
or )
['"]?
Optional quote
)
Close group
\)
Regex demo
The path is in group 1.
Note that using ['"]?
for both the opening and closing quotes means that it could also match when only the opening or closing is present as it is optional.
If you want only consistent matching where each opening quote is closed by a matching closing quote you might list all variations.