identifying and removing digit from a given string


using system;
using system.collections.generic;
using system.linq;
using system.web;
using system.web.ui;
using system.web.ui.webcontrols;
public partial class _default : system.web.ui.page
{
    public class test
    {
        protected void page_load(object sender, eventargs e)
        {
            string s1 = "palle123 technologies";
            specialcharacterzelim se = new specialcharacterzelim();
            string res = se.removenumerics(s1);

       }


    }
        public class specialcharacterzelim
        {

            public string  removenumerics(string   s )
            {
                     //code
            }
        }

 i getting error at public string  removenumerics(string   s ).

please help

hi raju4u;

did @ solution above , re-posted here , if did have issues it?

using system.text.regularexpressions;  public string removenumerics(string s) {     return regex.replace(s, "\\d+", "");     }

  


fernando (mcsd)

if post answers question, please click "mark answer" on post , "mark helpful".



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to Share webservice object to all user

How to fix error Msg 1801, Level 16, State 3, Line 1