Split string by word
<p>I have multiple strings assigned to variables which has a common word. How can I split these strings in to two parts from the common word?</p>

<pre><code>var str= "12344A56789";
</code></pre>

<p>Instead of having to write substring multiple times, is there a way to split the string from <code>4A</code> and get the following results?</p>

<pre><code>var first = "1234";
var second = "56789";
</code></pre>

<p>NOTE: Each string lengths are different.</p>