Create Regex From String Python Functions