Regular Expression

((https?://)?(www\.)?twitter\.com/)?(@|#!/)?([A-Za-z0-9_]{1,15})(/([-a-z]{1,20}))?

Details

Twitter handles can have up to 19 ASCII characters and underscore.

Twitter list slugs can have up to 20 lowercase ASCII characters and dash.

Tags: social, twitter, url

blog comments powered by Disqus