# Split String message

**URL:** <https://discourse.nodered.org/t/split-string-message/14801>\
**Category:** General\
**Created:** [26 August 2019 19:52 UTC](https://discourse.nodered.org/t/split-string-message/14801 "2019-08-26T19:52:44Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [26 August 2019 21:31 UTC](https://discourse.nodered.org/t/split-string-message/14801/21 "2019-08-26T21:31:06Z")

</div>

This is an example to extract the area from the input string, which should give you a clue as to extract the other data.

 ![slice](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fc99063a435f7bec1fb9a9efabeed76af604b6a4.jpeg)

```auto
[{"id":"be7c3c0a.e2fce","type":"inject","z":"c53060.842a0fa","name":"","topic":"","payload":"#213444|N/ri1/CQ","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":940,"wires":[["5f0c9787.302ac8"]]},{"id":"5f0c9787.302ac8","type":"function","z":"c53060.842a0fa","name":"","func":"var str = msg.payload;\nvar area = str.slice(10, -3);\nmsg.payload = area;\nreturn msg;","outputs":1,"noerr":0,"x":360,"y":940,"wires":[["e9b1e611.98c878"]]},{"id":"e9b1e611.98c878","type":"debug","z":"c53060.842a0fa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":520,"y":940,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![niclas.w82](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/niclas.w82/32/31813_2.png) [@niclas.w82](https://discourse.nodered.org/u/niclas.w82)\
**Post date:** [26 August 2019 21:50 UTC](https://discourse.nodered.org/t/split-string-message/14801/22 "2019-08-26T21:50:10Z")

</div>

Thank you!!

Will try it tomorrow

[Previous page](https://discourse.nodered.org/t/split-string-message/14801.md?page=1)
