Skip to content

Commit

Permalink
fix regex escape characters
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanhawari committed Feb 24, 2022
1 parent 2f6a9dd commit b807ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ var RegexAmd64 = `(?i)(x86_64|amd64|x64)`
var Regex386 = `(?i)(i?386|x86_32|amd32|x32)`

// RegexGithub is a regular express for valid GitHub repos
var RegexGithub = `(?i)^[A-Za-z0-9-]+\/[A-Za-z0-9_.-]+(@.+)?$`
var RegexGithub = `(?i)^[A-Za-z0-9\-]+\/[A-Za-z0-9\_\.\-]+(@.+)?$`

// RegexGithubSearch is a regular express for valid GitHub search queries
var RegexGithubSearch = `(?i)^[A-Za-z0-9_.-/]+$`
var RegexGithubSearch = `(?i)^[/A-Za-z0-9\_\.\-]+$`

// RegexURL is a regular express for valid URLs
var RegexURL = `(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])`

0 comments on commit b807ce8

Please sign in to comment.