Exrtact a part of cell in a data table

I am having some data in the form shown below

Input image

and require the data in below shown format

Output

i.e. to make Column2 values from “Tone RCT 9X12 110 Line AIWL-7003 Ashley Blue Cola” to “110 Line AIWL-7003 Ashley Blue Cola”.

The excel file is attached here:

Extract data.xlsx (9.7 KB)

Please help

Hi,

Try to use Regex(matches activity) it will give you the expected result.
Let us know if you need further assistance.

Regards,
Pavan H

@pavanh003 Thanks for reply but can you please let me know how to apply the condition in regex activity

Hi,
There is another simple way rather than using Regex you can use split function like this
Split(row.item(1).ToString, “X”)(1).Remove(0,2), This will give you the expected result.

Regards,
Pavan H

1 Like

@pavanh003 Thanks for the solution but i also want to remove 1 space tab which is now present at the starting of new string i.e. " 110 Line AIWL-7003 Ashley Blue Cola" output is coming and i want to remove first space from the output “110 Line AIWL-7003 Ashley Blue Cola”.

Hi,

Split(row.item(1).ToString, “X”)(1).Remove(0,2).Trim, will remove the extra space in start and end of the string

Regards,
Pavan H

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.