Revert D30281388: [PyTorch] Avoid using std::regex for device string parsing in Device.cpp
Test Plan: revert-hammer
Differential Revision:
D30281388 (https://github.com/pytorch/pytorch/commit/4d6f98ecada2d85b2474b023838debad4305316d)
Original commit changeset: 4d998e9f313e
fbshipit-source-id: 11134b3400cc3e851155c9c1b6fb59308ff1567b