[SS] some refactoring for listings environment. Move \regex and \tbs definition to common