Skip to content

Instantly share code, notes, and snippets.

@kevinadhiguna
Forked from technion/instagram regex
Created October 7, 2021 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinadhiguna/e8c531a763bf1c329093b29361d5a21c to your computer and use it in GitHub Desktop.
Save kevinadhiguna/e8c531a763bf1c329093b29361d5a21c to your computer and use it in GitHub Desktop.
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