Excessive Dashes :)

Posted by Community Admin on 05-Aug-2018 00:30

Excessive Dashes :)

All Replies

Posted by Community Admin on 18-Aug-2011 00:00

So if my item is "Hello - There.pdf" when uploaded the URL is (by default) "hello---there.pdf"

Could you perhaps filter out the redundant dashes?...or give me the option in settings to do that?

Posted by Community Admin on 23-Aug-2011 00:00

Hi Steve,

Unfortunately I don't believe there is a way to easily modify this behaviour. If you can manage to do that then the C# code to remove repeated dashes is rather simple:

var reducedString = Regex.Replace(inputString, "-+", "-");
var finalString = reducedString.Trim('-');

All the best,
Lubomir Velkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

This thread is closed