Hi All,
I have several strings coming from PDF, I want to sort such strings and put it into DT
Input
str = Royal Denson Short Term Mkt Y Acc 2.00 0.10 USD Money Market - Short Term
Output
Note- string text could be dynamic
Thanks
Rishi
Hi All,
I have several strings coming from PDF, I want to sort such strings and put it into DT
Input
str = Royal Denson Short Term Mkt Y Acc 2.00 0.10 USD Money Market - Short Term
Output
Note- string text could be dynamic
Thanks
Rishi
Use the below regex in assign activity
Name = System.Text.RegularExpressions.Regex.Match(Input,"[A-Za-z]+.*(?=\s+\d+\.\d+\s+\d+\.\d+)").Value
Price = System.Text.RegularExpressions.Regex.Match(Input,"\d+\.\d+(?=\s+\d+\.\d+)").Value
Rev = System.Text.RegularExpressions.Regex.Match(Input,"(?<=\d+\.\d+\s+)(\d+\.\d+)").Value
Market = System.Text.RegularExpressions.Regex.Match(Input,"(?<=\d+\.\d+\s+\d+\.\d+\s+)(.*)").Value
Regards
Check out the below flow:
=> Use Build Data Table to create the columns and output is dt.
=> Given input:
Input= "Royal Denson Short Term Mkt Y Acc 2.00 0.10 USD Money Market - Short Term"
=> Use below all syntaxes in Assign acitvity:
Name= System.Text.RegularExpressions.Regex.Match(Input,"[A-Za-z]+.*(?=\s+\d+\.\d+\s+\d+\.\d+)").Value
Price= System.Text.RegularExpressions.Regex.Match(Input,"\d+\.\d+(?=\s+\d+\.\d+)").Value
Rev= System.Text.RegularExpressions.Regex.Match(Input,"(?<=\d+\.\d+\s+)(\d+\.\d+)").Value
Market= System.Text.RegularExpressions.Regex.Match(Input,"(?<=\d+\.\d+\s+\d+\.\d+\s+)(.*)").Value
=> Use Add Data Row acitivity
Array Row -> {Name,Price,Rev,Market}
DataTable -> dt
=> Use Write Range Workbook to write back to excel.
Workflow:
xaml:
Sequence1.xaml (12.1 KB)
Output:
Regards
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.