Fixed a small bug in hardware agent concerning regex.