Remove string "M" and another one is replace the "-" by zero


#1

Hi,
I need to do two things;
first I have string with M which I need to remove like example 2.9M so it should be 2.9.
Second is I have to replace all the space ("-") with zero.
This all I need to do inside an excel.
How to do that?


#2

@Chirag1991 You have to do both things in single string?


#3

No,
not in single string two different strings


#4

system.Text.RegularExpressions.Regex.Replace(strm,"[^0-9],"").tostring

To replace - with 0
str.replace("-",“zero”).tostring