How to delete Duplicate string at beginning of the Text


I have “THOR” at many places in this excel, I want to delete "THOR " in the “Address” Column only if it is present at the start.I tried some methods but it is not working fine.It will be really appreciable if anyone suggests me some Idea.
Expected Output :

Thanks & Regards

@Kavyasri

Check as below

Attached the workflow
BlankProcess23.zip (2.8 KB)

Mark as solution if this helps

Thanks

1 Like

@ksrinu070184 Thanks for the quick Reply, Its working…I want it for the excel sheet,can you please suggest any logic for it

@Kavyasri

Drag the read range activity and it will give the datatable as the output,

Only step to add is Read Range and at the end you need Write Range it will work for Excel

For more reference, you can visit below post

Mark as solution if this helps

Thanks

1 Like

Remove word at beginning.zip (2.3 KB)
@ksrinu070184 Thanks for the reply…I made some changes according to your logic,but I am getting Output as : "THOR " is getting deleted everywhere… I need it to be deleted in the beginning…So once see this file and please tell me if any changes I need to do.

@Kavyasri

Check as below

image

Below workflow made changes
Remove word at beginning.zip (13.7 KB)

Mark as solution if this helps

Thanks

1 Like

@ksrinu070184 Thanks for your efforts…Your workflow is working but “THOR” is deleting everywhere…I need it to be deleted at the beginning
Input I gave :

For your reference :

Output I want :

@Kavyasri

Check as below
image
As the position is fixed, you can make as below

Hope this helps

Thanks

1 Like

@ksrinu070184 Thanks for the suggestion. I tried it in a different manner, using Regex statement in the assign activity
row(“Address”) = System.Text.RegularExpressions.Regex.Replace(row(“Address”).ToString,"^[THOR]+","").ToString.Trim
I got the required Output

1 Like

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