# \#split

**URL:** https://community.openhab.org/tag/split/864.md

[Latest](https://community.openhab.org/latest.md) · [Categories](https://community.openhab.org/categories.md) · [Tags](https://community.openhab.org/tags.md)

---

## [QH3: rule to test array length as a result of split()](https://community.openhab.org/t/qh3-rule-to-test-array-length-as-a-result-of-split/146412)

<div class="topic-metadata">

**Author:** [@Max\_G](https://community.openhab.org/u/Max_G)\
**Replies:** 1\
**Last updated:** [May 1, 2023, 12:15am UTC](https://community.openhab.org/t/qh3-rule-to-test-array-length-as-a-result-of-split/146412 "2023-05-01T00:15:30Z")

</div>

openHABian 3.3.4 on rPi4 with 4GB I get an error on a rule where I am looking for an index that does not exist; e.g. blah.split("|").get(3) In other languages I can say: uin8\_t num\_elements = blah.split("|") and num\_e…

---

## [Split String only on last seperator](https://community.openhab.org/t/split-string-only-on-last-seperator/146000)

<div class="topic-metadata">

**Author:** [@helipus](https://community.openhab.org/u/helipus)\
**Replies:** 4\
**Last updated:** [April 12, 2023, 7:14pm UTC](https://community.openhab.org/t/split-string-only-on-last-seperator/146000 "2023-04-12T19:14:06Z")

</div>

Hi, I have items with different amount of Seperators “\_” in the Itemname. Example: Fenster\_Badezimmer\_Nord\_Links\_Zustand Fenster\_Badezimmer\_Nord\_Links\_LetztesUpdate Fenster\_Badezimmer\_Nord\_Rechts\_Zustand Fenster\_Bade…

---

## [Split (or similar function) in rule (Javascript)](https://community.openhab.org/t/split-or-similar-function-in-rule-javascript/120533)

<div class="topic-metadata">

**Author:** [@Ursusprimus](https://community.openhab.org/u/Ursusprimus)\
**Replies:** 19\
**Last updated:** [April 15, 2021, 5:25am UTC](https://community.openhab.org/t/split-or-similar-function-in-rule-javascript/120533 "2021-04-15T05:25:41Z")

</div>

I need to extract the third number from an expression like 22,33,44 (the brightness of a hue-lightbulb). In YAML …state.split(“,”)\[2\] would do the job. But don’t know how to transfer this to Javascript in a rule. From …

---

## [No Emojis in Telegram after splitting unicode string](https://community.openhab.org/t/no-emojis-in-telegram-after-splitting-unicode-string/85026)

<div class="topic-metadata">

**Author:** [@WOPR](https://community.openhab.org/u/WOPR)\
**Replies:** 5\
**Last updated:** [November 22, 2019, 4:37pm UTC](https://community.openhab.org/t/no-emojis-in-telegram-after-splitting-unicode-string/85026 "2019-11-22T16:37:25Z")

</div>

Hey guys, I am having trouble with Emojis in Telegram after using .split(). My Rule uses an item that contains user/group and message split by ;: rule “Telegram-Gateway” when Item Telegram\_Gateway received update …

---

## [Json Split](https://community.openhab.org/t/json-split/12501)

<div class="topic-metadata">

**Author:** [@filoor1](https://community.openhab.org/u/filoor1)\
**Replies:** 2\
**Last updated:** [July 19, 2016, 7:45am UTC](https://community.openhab.org/t/json-split/12501 "2016-07-19T07:45:36Z")

</div>

want to split this value {“authenticationResultCode”:“ValidCredentials”,“brandLogoUri”:“http://dev.virtualearth.net/Branding/logo\_powered\_by.png”,“copyright”:“Copyright © 2016 Microsoft and its suppliers. All rights res…
