If I have a list with following elements
list[0] = "blach blah blah"
list[1] = "SELECT something"
list[2] = "some more text"
list[3] = "some more text"
How can I find the index of where the string starts with SELECT.
I can do list.indexOf("SELECT something");
But this is a dynamic list. SELECT something wont always be SELECT something. it could be SELECT somethingelse or anything but first word will always be SELECT.
Is there a way to apply regex to the indexOf search?
You can use a regex in find: