how to do substring in reverse mode in c#
<p>My string is "csm15+abc-indiaurban@v2". I want only "indiaurban" from my string. what I am doing right now is :</p>

<pre><code>var lastindexofplusminus = input.LastIndexOfAny(new char[]{'+','-'});

var lastindexofattherate = input.LastIndexOf('@');

string sub = input.Substring(lastindexofplusminus,lastindexofattherate);
</code></pre>

<p>but getting error "Index and length must refer to a location within the string."</p>

<p>Thanks in Advance.</p>