Return part of string between specific character pair, in string with multiple character pairs : <p>Text file or string:</p>

<p>SomeText1/SomeText2/SomeText3/SomeText4/SomeText5</p>

<pre class="lang-py prettyprint-override"><code>#What I am looking for:
split_func(3, "/")

&gt;&gt;&gt; SomeText3
</code></pre>
