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
System.Text.RegularExpressions.Regex.Match(βyourTextβ,β\w{2}-\d+β). Value