[Solved] Check if the text object contain a specific combination of letters written on it

I have seen that there is a event that compares the text written in a text object and if it returns true, it will continue the operations.

But it compares the whole text.

What I want to know is that if I could workaround to check if a part of the text contain a specific letter arrangement.


If “RandomGeneratedWord” has “oos” written, delete “RandomGeneratedWord”

Text objects that would get deleted from that prompt:


Text objects that would not get deleted:


If the only way be writing a javascript code, I would be happy if someone tell me a template where I could change the text object name and the specific letter arrangement.

It can look like one, but this is not a “suggest feature” topic.

By the way:

If anyone’s wondering why would I want something like this, it is because I will make a text object that links with the name of my character animation.

Then I would not lose my time copying and pasting “object animation is not x” “object animation is not y, not z”. Making me able to filter it searching for a word in the text object.

There’s a regular expression extension that will be of some help. Regular expressions (or regex) are a way of defining rules for pattern matching, and will do what you want.

1 Like