-
&& is referencing only part 2
I’ve reached the end of project and realised that I haven’t taken into account. If my colleagues type in Weekdays/Weeknights 7.30pm & 8.30pm, the text goes over the edge of my border I’ve created.
a = text.sourceText;
if (a.indexOf (“Weekdays” && “.30pm &”) != -1){
“Weekdays” +”\r”+ a.substr(9,25)
}
else if (a.indexOf (“Weeknights” && “.30pm &”) != -1){
“Weeknights” +”\r”+ a.substr(12,25)
}
else
a;but it seems to ignore the first word and only looks at “.30pm &”, which I don’t want it to. Any ideas?