Java Insert a string after 2nd paragraph
<p>I'm new to Java and this is what I'm trying to do:
I have a String content which is a string with html tags</p>

<pre><code>    &lt;p&gt;&lt;strong&gt;First Paragraph&lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;&lt;i&gt;Second paragraph....&lt;/i&gt;&lt;/p&gt;
    &lt;a&gt;....more tags etc...
</code></pre>

<p>There are several paragraphs with other html tags in between. I'm trying to insert a link after the 2nd paragraph.</p>

<p>I tried with string.split but it's not really working.</p>

<pre><code> String str = content;
 String[] temp;
 String delimiter = "[&lt;p&gt;]+";
 temp = str.split(delimiter);
 for(int i =0; i &lt; temp.length ; i++)
 System.out.println(temp[i]);
</code></pre>

<p>Any ideas on how to do this?
thanks</p>
