Friday, January 5, 2018

Regex Domain Name Validation | Regex URL Validation


Domain Name Validation (Regex-101 Link)
^((https?):\/\/)?([a-zA-Z0-9_][-_a-zA-Z0-9]{0,62}\.)+([a-zA-Z0-9]{1,20})$



URL Validation (Regex-101 Link)
^((https?):\/\/)?([a-z]*\.)+([a-z]+)(?:\/)?([a-z]+\/?)*(?:\?([a-z]+\=?[a-z]*&?)+)?(#[a-z]*)*

1 comment: