Improved command regex