# Delete parts of string consecutively

**URL:** <https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601>\
**Category:** Lists-Logic\
**Created:** [July 12, 2022, 5:04pm UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601 "2022-07-12T17:04:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christhian](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Christhian](https://forum.dynamobim.com/u/Christhian)\
**Post date:** [July 12, 2022, 5:04pm UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601/1 "2022-07-12T17:04:22Z")

</div>

Well I would like to remove different things from a string if I removed 1 by 1 it would be something simple, but if I had to remove for example 10 or 20 characters it would become a bit more complicated if

This initial script works fine but I wish it were a little faster to be able to add what you want to remove

[image]

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/7/3730936792b71dccad940049bd6a67d1800265a3.png)

If I transform it into a list, it does not work as I wish, it should be the same result as in the first

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/e/eead3eec675eaffdef7a3438cc7bc582bc568706.png)

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [July 12, 2022, 5:13pm UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601/2 "2022-07-12T17:13:37Z")

</div>

Hi @Christhian ,

The Clockwork Package has a node for this **String.ReplaceMultiple**. (Note that you need to install the IronPython2.7 package aswell in some of the latest Dynamo versions).

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a72f6df8655c495d358d47d07b236cf0440855f3.png)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [July 12, 2022, 6:23pm UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601/3 "2022-07-12T18:23:23Z")

</div>

Hello,  
another possibility

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/c/4c99a13f8fc513ba2566b3729dd327a362659efb.png)

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [July 13, 2022, 8:08am UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601/4 "2022-07-13T08:08:14Z")

</div>

Python option 🐍

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/a/7a23f087a78701042f5dcbb7a82acf07e53ba56d.png)

---

<div class="post-metadata">

**Author:** ![Christhian](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Christhian](https://forum.dynamobim.com/u/Christhian)\
**Post date:** [July 13, 2022, 3:44pm UTC](https://forum.dynamobim.com/t/delete-parts-of-string-consecutively/78601/5 "2022-07-13T15:44:34Z")

</div>

Thank you very much for all the answers, all three are excellent
