# To remove specific string from datatable

**URL:** <https://forum.uipath.com/t/to-remove-specific-string-from-datatable/2833285>\
**Category:** Something Else\
**Tags:** feedback, system, activities\
**Created:** [May 27, 2025, 3:08pm UTC](https://forum.uipath.com/t/to-remove-specific-string-from-datatable/2833285 "2025-05-27T15:08:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaveenKNave](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/naveenknave/32/503475_2.png) [@NaveenKNave](https://forum.uipath.com/u/NaveenKNave)\
**Post date:** [May 27, 2025, 3:08pm UTC](https://forum.uipath.com/t/to-remove-specific-string-from-datatable/2833285/1 "2025-05-27T15:08:55Z")

</div>

Hi All,

How to remove specific string from the datatable. It may contain in multiple columns  
for eg, FGO and ADO.  
These two string could be end of whole string or at the beginning or in the middle.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ppr](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ppr/32/464097_2.png) [@ppr](https://forum.uipath.com/u/ppr)\
**Post date:** [May 27, 2025, 3:24pm UTC](https://forum.uipath.com/t/to-remove-specific-string-from-datatable/2833285/2 "2025-05-27T15:24:46Z")

</div>

You can try the following:

Assign Activity  
dtCleansed | DataType: DataTable = YourOriginDataTableVar.Clone

Assign Activity  
dtCleansed =

```auto
(From d in YourOriginDataTableVar.AsEnumerable
Let rac = d.ItemArray.Select(Function (x) Regex.Replace(x.ToString,"FGO|ADO","")).Cast(Of Object).toArray
Select r=dtCleansed.Rows.Add(rac)).CopyToDataTable

```

Ensure the following:

 ![RegexImport](https://global.discourse-cdn.com/uipath/original/4X/4/4/3/4435fca7b6b43df8b1874b2c8a2662422cd1ed0b.png)

If further assistance is needed share with us some sample input data

---

<div class="post-metadata">

**Author:** ![prashant1603765](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prashant1603765/32/523412_2.png) [@prashant1603765](https://forum.uipath.com/u/prashant1603765)\
**Post date:** [May 28, 2025, 8:14am UTC](https://forum.uipath.com/t/to-remove-specific-string-from-datatable/2833285/3 "2025-05-28T08:14:11Z")

</div>

Hi @NaveenKNave

Try this,  
row(col.ColumnName) = row(col.ColumnName).ToString.Replace(“FGO”, “”).Replace(“ADO”, “”)

Happy Automation
