Function introduced to parse generator strings and generate strings e.g. for ports numbers of patch panels and switches.