If it is always 4 characters, dash, ...
([A-Za-z0-9]{4})([A-Za-z0-9]+)-.*
This regular expression will:
Look for exactly 4 alphanumeric case insensitive characters - this will be \1 aka string 1
Look for at least a 2 alphanumeric case insensitive string that follows - this will be \2 aka string 2
Look for a dash, follow by more characters
When this pattern matches, you will have 2 strings
If you change the format for this rule from "\1" to "\1-\2" , you will build a concatenated string of "string1-string2"
I would characterize this regexp as fairly risky - it is only worth trying if ALL of your hosts are named this way.
If this pattern only applies for TSM hosts, you will want to write a narrower regexp