ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Remove Integer at end of string in C#<p>Hi&nbsp;<a class="username" rel="dharmendr">dharmendr,</a></p> <p>The exact output:&nbsp;No Exceptions Noted</p> <p>I just found the answer:</p> <pre class="lang-cs prettyprint prettyprinted"><code><span class="kwd">var</span><span class="pln"> digits </span><span class="pun">=</span> <span class="kwd">new</span><span class="pun">[]</span> <span class="pun">{</span> <span class="str">'0'</span><span class="pun">,</span> <span class="str">'1'</span><span class="pun">,</span> <span class="str">'2'</span><span class="pun">,</span> <span class="str">'3'</span><span class="pun">,</span> <span class="str">'4'</span><span class="pun">,</span> <span class="str">'5'</span><span class="pun">,</span> <span class="str">'6'</span><span class="pun">,</span> <span class="str">'7'</span><span class="pun">,</span> <span class="str">'8'</span><span class="pun">,</span> <span class="str">'9'</span> <span class="pun">};</span> <span class="kwd">var</span><span class="pln"> input </span><span class="pun">=</span> <span class="str">"No Exceptions Noted 30"</span><span class="pun">;</span> <span class="kwd">var</span><span class="pln"> result </span><span class="pun">=</span><span class="pln"> input</span><span class="pun">.</span><span class="typ">TrimEnd</span><span class="pun">(</span><span class="pln">digits</span><span class="pun">);</span></code></pre> <p>Output:&nbsp;No Exceptions Noted</p> <p>Thanks for replying,</p> <p>Vikash</p>https://www.aspforums.net:443/Threads/142006/Remove-Integer-at-end-of-string-in-C/https://www.aspforums.net:443/Threads/142006/Remove-Integer-at-end-of-string-in-C/Mon, 29 Oct 2018 00:42:24 GMTRemove Integer at end of string in C#<p>Refer below code.</p> <pre class="brush: csharp">string Line1 = &#34;No Exceptions Noted Page 30&#34;; Response.Write(Line1.Split(new string[] { &#34;Page&#34; }, StringSplitOptions.None)[0]);</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/142006/Remove-Integer-at-end-of-string-in-C/https://www.aspforums.net:443/Threads/142006/Remove-Integer-at-end-of-string-in-C/Mon, 29 Oct 2018 00:46:22 GMT