Skip to content

Commit

Permalink
fix: update Switch regex to support nicknames with any character
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Oct 24, 2024
1 parent b22f61d commit c2b652b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions rlapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,7 @@
Platform.ps4: re.compile(r"[a-zA-Z][a-zA-Z0-9_-]{2,15}"),
Platform.xboxone: re.compile(r"[a-zA-Z](?=.{0,15}$)([a-zA-Z0-9-_]+ ?)+"),
Platform.epic: re.compile(r"[0-9a-f]{32}|.{3,16}"),
Platform.switch: re.compile(
r"""
[a-zA-Z0-9] # first character can't be punctuation
(?:
[a-zA-Z0-9] # non-punctuation character
|[_\-.](?![_\-.]) # or punctuation character that isn't repeated in a row
){4,14}
[a-zA-Z0-9] # last character can't be punctuation
""",
re.VERBOSE,
),
Platform.switch: re.compile(r".{1,10}"),
}


Expand Down

0 comments on commit c2b652b

Please sign in to comment.