String removal

Hai
i have three strings
B2345
B-2345
82345

in above i want only 2345

1 Like

try this @veera_g

str.Substring(str.Length -4)

where str is the text you have

1 Like

Good morning Veera,

We can do this very easily using regular expressions.

Try this in an assign stage:
string b= System.Text.RegularExpressions.Regex.Replace(‚Äústring_Variable‚ÄĚ,"\D","")

Source: