mirror of
https://github.com/Adaptix-Framework/AdaptixC2
synced 2026-06-08 10:20:39 +00:00
19 lines
385 B
Go
19 lines
385 B
Go
package isvalid
|
|
|
|
import "regexp"
|
|
|
|
func ValidUriString(s string) bool {
|
|
re := regexp.MustCompile(`^/(?:[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*)?$`)
|
|
return re.MatchString(s)
|
|
}
|
|
|
|
func ValidSBString(s string) bool {
|
|
re := regexp.MustCompile(`^[a-zA-Z]+$`)
|
|
return re.MatchString(s)
|
|
}
|
|
|
|
func ValidSBNString(s string) bool {
|
|
re := regexp.MustCompile(`^[a-zA-Z0-9-_]+$`)
|
|
return re.MatchString(s)
|
|
}
|