Fixed regex for detecting port