Fix space name escaping in regex