I looked at the code again to make sure I wasn't speaking out of turn and it basically works like this:
>>> import re
>>> pattern='(\\\\|/|\s+|;|-)'
>>> testdata='this-is-a-test.txt'
>>> matches=re.split(pattern, testdata)
>>> matches
['this', '-', 'is', '-', 'a', '-', 'test.txt']
>>> pattern='(\\\\)'
>>> testdata='this-is-a-test.txt'
>>> matches=re.split(pattern, testdata)
>>> matches
['this-is-a-test.txt']
The delims value is just a splitter, not a filtering mechanism despite the bad variable naming I used in the script. I'll have to rename that later on... At any rate, modifying the delims to not include the hyphen should solve your issue.
... View more