-
-
Save kevinadhiguna/e8c531a763bf1c329093b29361d5a21c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def instacheck(name) | |
unless /[a-z0-9._]{,30}/.match(name) | |
return false | |
end | |
if /\.\./.match(name) | |
return false | |
end | |
if /^\d+$/.match(name) | |
return false | |
end | |
if /^\./.match(name) | |
return false | |
end | |
true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment