The current expression validates a web address (HTTP), how do I change it so that an empty string also matches?
(http|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+
Put the whole expression in parenthesis and mark it as optional (“?” quantifier, no or one repetition):
?
((http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)?