Skip to content

Instantly share code, notes, and snippets.

View behnampro's full-sized avatar

Behnam Mirzaei behnampro

View GitHub Profile
@behnampro
behnampro / check_sheba.go
Last active February 16, 2021 15:49
تشخیص صحت کد شبا در گولنگ | validate IR sheba code
func CheckSheba(text string) bool {
matched, err := regexp.MatchString("^IR[0-9]{24}$", text)
if err != nil || matched != true {
return false
}
firstForChars := ""
sheba := ""
for index := range text {
if index < 4 {
if string(text[index]) == "I" {