How would I split a string by words without splitting the RichText tags

i am trying to split a string by words so i can put them in a listlayout, so i can hide some of the words

my current output:
{'some', 'random', '<font', 'color="rgb(255,0,0)"', '>text</font>'}

what i’m looking for:
{'some', 'random', '<font color="rgb(255,0,0)">text</font>'}

1 Like

nvm i solved it by putting a random unicode symbol like to be in place of the spaces and then replaced them after the string was split by space, so it would be like
{'some', 'random', '<font⇒color="rgb(255,0,0)">text</font>'}
and then in the for loop to create the items i just used string.gsub to replace the symbols with spaces.

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