I try to cut a string and save to a specific column in excel.
For example:
case number: 123456789 First Name: John
I tried to split by “:” but then the result will be “123456789 First Name”.
I only need the number in this case.
Use this regex code. This will extract only the numbers present inside the string.
System.Text.RegularExpressions.Matches(“case number: 123456789 First Name: John”,“([0-9]+)”)