+1-888-365-2779
Try Now
More in this section

Forums / Suggestions / Excessive Dashes :)

Excessive Dashes :)

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    18 Aug 2011
    Link to this post
    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?
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    23 Aug 2011
    Link to this post
    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 >>

2 posts, 0 answered