How to extract only numeric value from a particular String element

MyString = {“27th”,“Mar”,“2001”}
Need output like :
MyString = {“27”,“Mar”,“2001”}
only for Mystring(0)


Please try this

Mystring(0) = System.Text.RegularExpressions.Regex.Match(mystring(0),"\d+").Value


1 Like

It worked perfectly bruh!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.