Terrorist groups operating from Afghanistan pose threat to regional security, says army top brass