# Text uit een html halen

**URL:** <https://community.homey.app/t/text-uit-een-html-halen/108769>\
**Category:** Vragen & hulp\
**Created:** [April 24, 2024, 6:19am UTC](https://community.homey.app/t/text-uit-een-html-halen/108769 "2024-04-24T06:19:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 24, 2024, 12:32pm UTC](https://community.homey.app/t/text-uit-een-html-halen/108769/3 "2024-04-24T12:32:44Z")

</div>

Met split() en splice() kun je vrij aardig een woord/getal uit een tekst filteren

 ![Screenshot from 2023-10-04 03-55-15](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/b/3b272099a69e2abc650fafa21fdee096a7dce5bf.png)

> [@Monitor external ip and warn ik changed](https://community.homey.app/t/monitor-external-ip-and-warn-ik-changed/90781/10):
>
> Update: A little improvement. While the filter slice(2, 15) is not flexible, I found a way to ensure the IP only is returned, no matter the number of digits: var response = args[0]; // A) while the - symbol is (while the returned data doesn't change) // the first one, and close to the actual IP address, // we select the string following the - symbol. // B) when the IP has less than 12 digits, remove trailing HTML code "\</" var myIP = '' + response.split("-")[1].slice(2).split("\<")[0]; conso…

---

_[View the full topic](https://community.homey.app/t/text-uit-een-html-halen/108769)._
