Wednesday, 18 September 2013

C# Regular Expression filtering characters

C# Regular Expression filtering characters

I am having a string in C# and I would like to filter out (throw away) all
characters except for digits i.e. 0 to 9. For example if I have a string
like "5435%$% r3443_+_+**¨i¨e¡û", then the output should be 54353443. How
can this be done using regular expression or something else in C#?
Thanks

No comments:

Post a Comment