Regular Expression

i have string like
i need to remove L/ from it

1 Like

You can use Replace to remove the “L/” from the strings.For example

raw = L/WFH/L/LOP/
string = raw.tostring.replace(“L/”,“”)

Feel free to revert for any further clarifications.





in my case its not a string :frowning:

Hey @preethi

Use like this assign1=“WFH/L/” // with quotes

and if your variable assign1 is already of String datatype then just use like this assign.replace(“L/”,“”)


i get this value from excel sheet
i.e assign=row.item(1).tostring
then i need to remove L/

yes then what is your assign variable data type? Generic or String?

If string then
String assign = row.item(1).Tostring

assign.replace(“L/”,“”) will work.

1 Like

its not deleting L/ from excel

@preethi - A sample workflow for your understanding. string_replace_sample.xaml (5.3 KB)

If you wants to see the replaced data into excel as well then you have to update the str variable output to excel.



May be someone other will help you on this.
Have you completed all trainings? It will be good for you to get
understanding on such things.
Meanwhile you can search forum as well will get many resources on

Happy learning …

Hi Preethi,

Here you can play around.

Like :

  1. Create a variable as data type of Data Table in Variables
    2: Use “Read Range” activity to pull the data from excel and store them to the data table which was created in Step 1. (make Range as “” to pull all the records from excel)
    3: Use “For Each row” activity with the data table what we loaded in Step 2 and try to go through each row and update the value by assigning the replaced value (row(columename).replace(“L/”,“”)).
    4: Use “Write range” under Workbook to create the updated excel sheet by using the updated data table in Step 3…
  2. after all the above steps, you must see your expected and updated excel data sheet to the specified path.

Please try to go with the above steps and let us know.