Can I store a set of strings of a multiple line using regex on java? : <p>If I have an input of</p>

<pre><code>this is a string
this is also a string
i am a string
</code></pre>

<p>can i store them in an array like</p>

<pre><code>[0] this is a string
[1] this is also a string
[2] i am a string
</code></pre>

<p>If so, how can I achieve this kind of output?</p>
