david-wg2
09/10/2019, 2:22 PM"<my-tag>...</my-tag>".removePrefix("<").takeWhile { it != '>' }
Shawn
09/10/2019, 2:27 PMdavid-wg2
09/10/2019, 2:31 PMMatteo Mirk
09/10/2019, 2:32 PMval re = Regex("<(\\w+)>")
re.find("<my-tag>...</my-tag>")?.groupValues?.get(1)
obviously this works on very simple strings containing one tag, a regex can’t parse a full xml documentShawn
09/10/2019, 2:34 PMMatteo Mirk
09/10/2019, 2:34 PM<([-\w]+)
david-wg2
09/10/2019, 2:39 PMAlowaniak
09/10/2019, 3:07 PMMatteo Mirk
09/10/2019, 3:14 PM