How to: Get a part of a text

Examples:
How to get the third (Wednesday)?
Monday|||Tuesday|||Wednesday|||Thursday|||Friday

Monday
Tuesday
Wednesday
Thursday
Friday

I got it.

function OnClick(clickData)
{
 var text = "Monday|||Tuesday|||Wednesday|||Thursday|||Friday";
 var myArray = text.split("|||");
 DOpus.Output(myArray[3]);
}

As an aside, posting documentation about other programs or languages is probably going to confuse other people and isn't usually needed, as long as you can explain what you're trying to do.

(I've edited it out so people don't find the thread and think it's a function they can use in Opus. JScript and VBScript functions should work, OTOH.)