Twitter Username Search – Regex

This regex will help you search for or validate a Twitter username. Twitter username must be less than 15 letters. Can only contain alphabet letters plus number and underscore. Twitter may change their rule for an allowable username in the future. I might update the regex if I get notify that Twitter changed their policy for allowable usernames.

/^([a-zA-Z0-9_]){1,15}$/g

This post was written by Kevin and was first post @ http://kevinhng86.iblog.website.
Original Post Name: "Twitter Username Search – Regex".
Original Post Link: http://kevinhng86.iblog.website/2017/01/22/twitter-username-search-regex/.

Advertisement


Random Article You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*