I am using velocity templates and need to split the output of a function into an array of sentences:
$page.getSectionCopy()
which outputs:
The first sentence. The second sentence. The third sentence. The fourth sentence.The fifth sentence.
What I would like to achieve is the following:
<p>
The first sentence. The second sentence.
</p>
<p>
The third sentence. The fourth sentence. The fifth sentence.
</p>
So as you can see, I need to get the first two sentences and put them in the first <p>
tag.
Any help would be greatly appreciated.
tag.
– steakpi Oct 29 '14 at 15:13