Hey i have a string in datatable
000050996-001/1
I want to remove 001/ and want output as 000050996-1
Try this:
Assign activity:
Dim inputString As String = "000050996-001/1"
Dim outputString As String = System.Text.RegularExpressions.Regex.Replace(inputString, "[\d]+\/", "")
Log Message activity:
Output: "Output string: " + outputString
Hope it helps!!
Hi @Parvathy ,
you can use regex,
or get string remove substring if all item same format
regards,
LNV
Thanks , We can also do this from replace string
1 Like
1 Like
If all row same format you can use
row(“ColumnName”) = row(“ColumnName”).ToString.Replace(“001/”, “”)
1 Like
string.replace(“001/”,“”)
1 Like
you can try with regex also ! @Kuldeep_Pandey
- Drag and drop a For Each Row activity onto your workflow.
- Configure the For Each Row activity to iterate through your DataTable (
myDataTable
). - Inside the For Each Row activity, add an Assign activity.
- In the Assign activity, set the left-hand side to
row("ColumnName")
. - Set the right-hand side to
row("ColumnName").ToString.Replace("001/", "")
.
row("ColumnName") = row("ColumnName").ToString.Replace("001/", "")
Hope it helps!!
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.