How do you specify that you want to return a substring containing all characters from the start of a string up to but not including the first dot or dash?
For example if the original string is:
'abcdefg.hij-k'
or if the original string is:
'abcdefg.hi-j.k.l.mn-op'
Then the same substring of:
'abcdefg'
should be returned.
The key thing here is that there may be multiple dots and dashes occurring randomly and we are only interested in the first chunk of characters.
EDIT: A dot or a dash may occur first.