Scripts/Commands: Replace regex usage

Sorry for the shitty C code but std::regex is not supported by GCC 4.7 and 4.8