// You can edit this code! // Click here and start typing. package main import ( "fmt" "regexp" ) var phone = "087887xx42895" func IsValidPhone(value string) bool { pattern := `^\+?(6289|6287|6285|6283|6282|6281|089|087|085|083|082|081)+?([0-9]\d{1,20}$)` match, _ := regexp.MatchString(pattern, value) return match } func main() { match := IsValidPhone(phone) fmt.Println(match) }