I get input files name like bellow mentioned format. Use regex expression i want output
Input - EA-0000816860.CALC Final 2
EA-0001527697.CALC Final
Output -EA-0000816860
EA-0001527697
Thanks,
Karthik
I get input files name like bellow mentioned format. Use regex expression i want output
Input - EA-0000816860.CALC Final 2
EA-0001527697.CALC Final
Output -EA-0000816860
EA-0001527697
Thanks,
Karthik
@Karthik_Murugesan
Take this in an assign ==> System.text.RegularExpressions.Regex.Match(YourInputString,“\w{1,}[-]\d{1,}”).Value.ToString
And for Multiple matches you can take==>System.text.RegularExpressions.Regex.Matches(YourInputString,“\w{1,}[-]\d{1,}”)
you will get your output in RegEx Match collection
There are two methods to get this
Using Regex
Str_output = System.Text.RegularExpressions.Regex.Matches(str_input.ToString, “.*(?=\.)”)(0).ToString
using split method
In assign activity
Str_output = Split(str_input.ToString, “.”c)(0).ToString
Cheers @Karthik_Murugesan
If structure is same the try the below
System.Text.RegularExpressions.Regex.Match(str,"EA-\d+").Value
Here str is the variable containing the data
EA-\d+
Cheers