The current expression validates a web address (HTTP), how do I change it so that an empty string also matches?
(http|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+
Expr? where Expr is your URL matcher. Just like I would for http and https: https?. The ? is a known as a Quantifier -- you can look it up. From Wikipedia:
Expr?
Expr
http
https
https?
?
? The question mark indicates there is zero or one of the preceding element.