I Want to find all the word after Smr- so i how i can do this
not all the word only chongqing , tianjin ,xizhou , istanbul
U can use this if you want Full Text after SMR
Yourstring.substring(yourstring.indexOf("SMR")+("SMR- ").Length.trim
if you want Only Specific after “SMR”
you can use this Regex Function
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=SRM\s\W\s)\S+").Tostring
Thanks
Harivishnu
You can try with regex expression
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=SRM\s\W\s)\S+").Tostring
Regards
Gokul
Which Activity you used for this
Its not creating only last folder iatanbul i dont know whats the problem its creating all 3 but not 4
Try with this expression
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=SRM\s\W\s)\S+|(?<=SRM\s\W)\S+").Tostring
Regards
Gokul
its not working
I read 4 Subject heading again there is one space more than all 3 subject after smr
Try with this
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=SRM\s+\W\s+)\S+").Tostring
Checkout this
Split("DO33 - SMR - Chonging - September - 2022","-")(2).Trim
Make sure that the symbol “-” matches with the one you have in the string it seems like the “-” length slightly big than the normal “-”
Regards
Sudharsan
Try with this expression
System.Text.RegularExpressions.Regex.Match("YourString","(?<=SRM\s.+\W\s)\S+").Tostring
Check out the Output
Hello @Kuldeep_Pandey
Hope you are trying to get the file names of the attachment. So you need to loop through the email attachment names and then use the string manipulation to get the names. To get the names you can do as below.
Split(attachment.Name,“-”)(2)
where attachment.name gives you the names of attachment in the loop.
Thanks