jQuery: How to select text between two closed html tags
<p>I am trying to wrap the intro/help text in html document using jQuery.It is not inside any tag but between two closed html tags.</p>

<p>Please see attached code snippet for example. the 2nd end tag can also be other than <code>&lt;p&gt;</code>.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var txtHelp = jQuery('b.page-title').nextUntil('p').text();
console.log(txtHelp);

//jQuery('b.page-title').nextUntil('p').text().wrap("&lt;p /&gt;");</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;

&lt;b class="page-title"&gt;&lt;h4&gt;System Log&lt;/h4&gt;&lt;hr class="text-primary"&gt;&lt;/b&gt;
How to select this text and wrap it in new P-Tag
&lt;p align="center"&gt;This can by any html tag&lt;/p&gt;</code></pre>
</div>
</div>
</p>