Regular Expression for text that validates IPV4 or Hostname followed by a port number eg: 127.0.0.1:8080 or localhost:8080
While this appears to work, there are a few things about it that are not very clear.

Reconsider the use of regex

Rather than using a regex, for the numeric ranges in particular, it may make more sense to capture those values and check them with Java statements.  It would certainly reduce the size and complexity of the regex.

Document non-obvious constraints

The current regex includes a 1,253 count, the origin of which is decidedly non-obvious.  RFC 1035 and RFC 822 are both obvious candiates for an authoritative source, but this regex does not conform to either of those.