This question already has an answer here:
- How to convert regexp from lookahead 1 answer
- Using positive-lookahead (?=regex) with re2 2 answers
- How to simulate negative lookbehind in Go 2 answers
- Negative Look Ahead Go regular expressions 3 answers
- Go regex, Negative Look Ahead alternative 1 answer
I have a regex to detect absolute path in CSS, with javascript it work, but not in GOLANG: this is my regex:
url\((?!['"]?(?:data|http|https):)['"]?([^'"\)]*)['"]?\)
In golang, when run it catch error:
error parsing regexp: invalid or unsupported Perl syntax: `(?!`
Does anyone known how to fix this error?
This is demo:
This is demo work with other language, not golang:
https://regex101.com/r/WkbUuT/4
</div>