I have a variable text which can look like this: abc_defg_hijklm_20180810.zip. The letters can vary and sometimes there can be more underscores with text in the text.
I need to extract the ‘20180810’ out of the string.
I started with varnameNew = varnameOld.split(“.”c)(0) to get the part before the .zip. But now I need to know how to extract the last 8 characters.
Thanks for your response @ranjith.
Do I put this in an assign activity?
Because it is not giving me any result for the moment. (blank result in the output panel)
@yannip And if you want to fetch only number from your string then used blow regex
System.Text.RegularExpressions.Regex.Replace(str,“[A-Z a-z]”,“”)
str is my variable where i stored my string .