Skip to content

Instantly share code, notes, and snippets.

@onlyphantom
Last active May 24, 2019 10:51
Show Gist options
  • Save onlyphantom/e05d79508cb6a4b6148ac5dbe6b6b1fe to your computer and use it in GitHub Desktop.
Save onlyphantom/e05d79508cb6a4b6148ac5dbe6b6b1fe to your computer and use it in GitHub Desktop.

Revisions

  1. onlyphantom revised this gist May 24, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion validate_repo.py
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@

    import re
    def validate_repo_url(value):
    reg = re.compile('^([a-zA-Z\d]{1}[-A-z\d]+)(/){1}([\-\w]+)$')
    reg = re.compile('^([a-zA-Z\d]{1}[-a-zA-Z\d]+)(/){1}([\-\w]+)$')
  2. onlyphantom revised this gist May 24, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion validate_repo.py
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@

    import re
    def validate_repo_url(value):
    reg = re.compile('^([A-z\d]){1}([-A-z\d]+)(/){1}([\-\w]+)$')
    reg = re.compile('^([a-zA-Z\d]{1}[-A-z\d]+)(/){1}([\-\w]+)$')
  3. onlyphantom created this gist May 24, 2019.
    8 changes: 8 additions & 0 deletions validate_repo.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # for username:
    # Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen
    # for repo url:
    # any valid alphanumeric including underscores

    import re
    def validate_repo_url(value):
    reg = re.compile('^([A-z\d]){1}([-A-z\d]+)(/){1}([\-\w]+)$')