package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`\%([A-Z0-9-]+)\.`)
var str = `"https://firebasestorage.googleapis.com/v0/b/project-6312172760840445565.appspot.com/o/images%2Fjohn%2F356BEDA3-E0B2-4659-9DE2-37FC8C13CDF7.webp?alt=media&token=f0c16de2-c1d9-4392-8f5b-9aa5c0527ea3"`
if len(re.FindStringIndex(str)) > 0 {
fmt.Println(re.FindString(str),"found at index",re.FindStringIndex(str)[0])
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/