Angular ng-pattern: textarea format regex
<p>I want to control form of user input in textarea on my page. 
The input has to look exactly like this:</p>

<p><a href="https://i.stack.imgur.com/ydnIR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ydnIR.png" alt="enter image description here"></a></p>

<p>That means only three values in one row and semicolon between the first and the second and between the second and the third value. </p>

<p>By now I am using this regex to validate it:</p>

<pre><code>^((([^;]+);([^;]*);([^;]+))\n?)*$
</code></pre>

<p>It does not work 100%, because it validates input like </p>

<pre><code>value1;value2;value3
value1
</code></pre>

<p>as valid. Problem is the new line and the beginning of next value1. It seems like until first semicolon written after the value1, the value1 is still appended to the end of the value3 in previous line. How should I change the regex to disable this and mark every new incomplete line as invalid?</p>

<p>I created an JS fiddle to demonstrate:
<a href="https://jsfiddle.net/tw2y5omc/3/" rel="nofollow noreferrer">https://jsfiddle.net/tw2y5omc/3/</a></p>