Test, validate and match regular expressions
This regex matches valid TCP/UDP port numbers (1-65535) while excluding certain restricted ports like 23 (telnet), 137-139 (NetBIOS), and some ports ending in 9. It's designed to extract port numbers from text while respecting word boundaries, making it useful for network configuration validation, security scanning, or filtering specific port ranges from logs and configuration files.