Correctly detect devices with regular expressions.