Code example:
func main() {
regx:= `
[^`]
`
}
./main.go:9:4: syntax error: unexpected ] at end of statement
./main.go:10:1: string not terminated
How to solve back quotes nested back quotes?
Code example:
func main() {
regx:= `
[^`]
`
}
./main.go:9:4: syntax error: unexpected ] at end of statement
./main.go:10:1: string not terminated
How to solve back quotes nested back quotes?
I see what you want but we cannot escape backticks inside backticks. However, you can do something like the following.
regx := `
[^` + "`" + `]
`