Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nothingrandom/social-regex
🚦 Regex patterns for social media profiles
https://github.com/nothingrandom/social-regex
Last synced: 4 days ago
JSON representation
🚦 Regex patterns for social media profiles
- Host: GitHub
- URL: https://github.com/nothingrandom/social-regex
- Owner: nothingrandom
- License: mit
- Created: 2017-11-07T09:03:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T13:40:16.000Z (over 5 years ago)
- Last Synced: 2024-10-29T03:41:49.501Z (17 days ago)
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# social-regex
> Regex patterns for social media profilesThis README file lists regex (regular expressions) to match social media profile / platform URLs.
## GitHub
### Usernames
`^(http(s)?:\/\/)?(www\.)?github\.com\/(?!-)(?:[A-z0-9-]){1,39}[^-]\/?$`Rules:
- Max 39 alphanumerical characters
- Hyphens are allowed, but usernames cannot start or end with one[regex101 example](https://regex101.com/r/cjlmSt/1)
### Usernames
`^(http(s)?:\/\/)?(www\.)?reddit\.com\/user\/(?:[A-Za-z0-9_-]{3,20})\/?$`Rules:
- Prefixed by `/user/`
- 3-20 alphanumberical characters
- Hyphens
- Underscores[regex101 example](https://regex101.com/r/9DERwM/1)
### Usernames
`^(http(s)?:\/\/)?(www\.)?instagram\.com\/([A-Za-z0-9_](?:(?:[A-Za-z0-9_]|(?:\.(?!\.))){0,28}(?:[A-Za-z0-9_]))?)\/?$`Rules:
- Max 30 alphanumerical characters
- Underscores
- Periods are allowed in singles (. not ..), username cannot start or end with one[regex101 example](https://regex101.com/r/GaJdb9/6)
### Public URLS
`^(http(s)?:\/\/)?(www\.)?linkedin\.com\/(in|profile|pub)\/([A-z 0-9 _ -]+)\/?$`Rules:
- Prefixed by `/in/`, `/profile/`, or `/pub/`
- Alphanumerical
- Hyphens
- Underscores
### Usernames
`^(http(s)?:\/\/)?(www\.)?twitter\.com\/[A-z 0-9 _]{1,15}\/?$`Rules:
- 15 alphanumerical characters
- UnderscoresTODO:
- Dribbble
- Spotify
- Skype
- SoundCloud
- Google Plus
- Telegram
- Phone numbers
- Medium
- YouTube
- StackOverflow
- Vimeo
- Keybase