# String.Replace one specific number

**URL:** <https://forum.dynamobim.com/t/string-replace-one-specific-number/35664>\
**Category:** Revit\
**Created:** [May 7, 2019, 11:46am UTC](https://forum.dynamobim.com/t/string-replace-one-specific-number/35664 "2019-05-07T11:46:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mee](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mee](https://forum.dynamobim.com/u/mee)\
**Post date:** [May 7, 2019, 11:46am UTC](https://forum.dynamobim.com/t/string-replace-one-specific-number/35664/1 "2019-05-07T11:46:15Z")

</div>

Hi,

is it possible to make dynamo replace a number - and only if the number “stands alone”.

Example:  
Every time the value is 0 it has to replace 0 with xx.  
But when the value is 100 or 200 it should NOT replace anything.

I have made this script, where it replaces all 0’s no matter if it is a part of another number og stands alone.

 ![Udklip1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/72c3791ccf6ee031db97208f360ffbb8dca74b68.jpeg)

---

<div class="post-metadata">

**Author:** ![salvatoredragotta](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/salvatoredragotta/32/10078_2.png) [@salvatoredragotta](https://forum.dynamobim.com/u/salvatoredragotta)\
**Post date:** [May 7, 2019, 11:54am UTC](https://forum.dynamobim.com/t/string-replace-one-specific-number/35664/2 "2019-05-07T11:54:49Z")

</div>

@mee

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

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 7, 2019, 12:53pm UTC](https://forum.dynamobim.com/t/string-replace-one-specific-number/35664/3 "2019-05-07T12:53:31Z")

</div>

You can do the same thing @salvatoredragotta suggested with nodes as well and they don’t even need to be strings. The main point is that you want to check and replace the _item_, not the string value.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/6/d61bc3b774fb92459bc8f385038e816bcdd85765.png)

---

<div class="post-metadata">

**Author:** ![mee](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mee](https://forum.dynamobim.com/u/mee)\
**Post date:** [May 8, 2019, 5:19am UTC](https://forum.dynamobim.com/t/string-replace-one-specific-number/35664/4 "2019-05-08T05:19:53Z")

</div>

@Nick_Boyts Thanks, that worked! 🙂 Easier than I thought
