I am having a data table string.xlsx (8.4 KB) containing strings like :
High Sample Square 2X2 80 LINE HS WV
High Sample RCT 1’6X2 80 LINE HS WV
Rumts RCT 10X14 8/8 RWB ESK-93
Sample High Sample RCT 2X3 8/8 RWB ESK-91
High Sample Square 1’6X1’6 8/8 RWB ESK-624
I want to extract string and do changes like:
Square 2X2 80 LINE HS WV
RCT 1’6X2 80 LINE HS WV
10X14 8-8 RWB ESK-93
RCT 2X3 8-8 RWB ESK-91
Square 1’6X1’6 8-8 RWB ESK-624
Here, the strings are a combination of some features and the output i require is word earlier of ‘X’ and to replace / with -
Thanks @balupad14 for sharing the information but i my case i can replace / with - using the activity but how would i extract the required string .
what do you mean word earlier of X
do you want to remove all the words before “Square” and “RCT”?
for example if input is High Sample Square 2X2 80 LINE HS WV
the output Square 2X2 80 LINE HS WV?
use this expression to extract the required string and use Add data Row activity too them into your excel.
(?<=High Sample |(RCT)).*
Please check the below output, This should help you.
Code for ref - DT_ReplaceString.zip (23.7 KB)
This may help you. Logic behind the code is it will form a string starting from earlier word of X as you mentioned.
@Nithinkrishna Thanks for the solution, it worked on my actual case . Can i add a replace in the same workflow to replace / with -
Hey @Swara_Soni, Extremely sorry for missing it.
Please add at the end, should work fine.
and it is working fine
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.