Also, a serious weakness in regex is they are "write only", or hard to read. That's because they are compact and don't have discernible sections that are then assembled together.
You can do that yourself in Java by assigning chunks of regex to variables and then concatenating them together, but the regex engine doesn't let you do that itself. You can't name sections of the regex or insert comments into it.
The example
^(?:http)(?:s)?(?:\:\/\/)(?:www\.)?(?:[^\ ]*)$
could be better if it could be broken down into named pieces or commented like this: ^
(?:http)(?:s)? # http or https
(?:\:\/\/) # ://
(?:www\.)? # optional www.
(?:[^\ ]*) # rest of URL (no spaces)
$