Created
June 9, 2018 17:19
-
-
Save crunchywelch/a83acd516ffd6427b36d61598b8db47a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"regexp" | |
) | |
func main() { | |
if is_upper_AZ("Testing") { | |
fmt.Println("match") | |
} else { | |
fmt.Println("did not match") | |
} | |
} | |
func is_upper_AZ(x string) bool { | |
matched, _ := regexp.MatchString("^[A-Z]", x) | |
return matched | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment