“ACN - Test Number & Test Channel Statements 15.09.23.xlsx”… I want to get Test Number , Test Channel from this string. Can someone help to do this ?
HI @ajnaraya
Duplicate topic
Please create only one topic , If you dont get your answer on that just tag someone to look into it
Regards
Sudharsan
Hi @ajnaraya
How about this expression
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=ACN\s\W\s)\S.+(?=&)").Tostring
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=&\s)\S.+(?=\sStatements)").Tostring
Hi @ajnaraya
Use the regular expressions to extract the required output from the input String
- Assign -> Input = "ACN - Test Number & Test Channel Statements 15.09.23.xlsx"
- Assign -> Output = System.Text.RegularExpressions.Regex.Matches(Input.ToString,"((?<=&\s+|\-\s+)[A-Za-z]+\s+[A-Za-z]+)")
Check the below image for better understanding.
Hope it helps!!