# Delete characters

**URL:** <https://discourse.nodered.org/t/delete-characters/27893>\
**Category:** General\
**Created:** [6 June 2020 12:44 UTC](https://discourse.nodered.org/t/delete-characters/27893 "2020-06-06T12:44:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jml](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jml](https://discourse.nodered.org/u/jml)\
**Post date:** [6 June 2020 12:44 UTC](https://discourse.nodered.org/t/delete-characters/27893/1 "2020-06-06T12:44:07Z")

</div>

i want delete of the first twelve characters received from a UDP network message?  
in the beginning of the network message, the date and time are indicated, I do not want forward this information.  
I just want to recover the information that is after the date and time.

example UDP network message received:  
20\_06\_20 12:30:02 alarm triggering input 1

I wish to simply forward or use:  
alarm trigger input 1

thanks for your return

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 June 2020 12:50 UTC](https://discourse.nodered.org/t/delete-characters/27893/2 "2020-06-06T12:50:17Z")

</div>

You can add a function node that calls `substr`

```auto
msg.payload = msg.payload.substr(18);
return msg;

```

Proof....  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/84eeaa4d3a573088ab935f133387386a495fcb90.png)

Probably also possible in a change node with JSONata

---

<div class="post-metadata">

**Author:** ![jml](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jml](https://discourse.nodered.org/u/jml)\
**Post date:** [6 June 2020 13:33 UTC](https://discourse.nodered.org/t/delete-characters/27893/3 "2020-06-06T13:33:08Z")

</div>

> [@Steve-Mcl](#):
>
> You can add a function node that calls `substr`

thanks for your help, it works perfectly

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 June 2020 13:33 UTC](https://discourse.nodered.org/t/delete-characters/27893/4 "2020-06-20T13:33:10Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
