For example, you can use this to add a line number to each selected line, by evaluating the following expression:
(index+1) + " " + text
Or you can add a prefix and suffix to each selected line, with this expression:
"<listitem>" + text + "</listitem>"