Match any group of characters before a line break sign
<p>I am trying to match any group of characters until a line break like this: <code>\n</code>. I want to be able to access all groups matched then.</p>

<p>The text I am using to look for my regular expression is like this : </p>

<pre><code>foo foo!\n *bar bar*\n *foo :* foo bar\n*foo :* 32 foo bar\n*Bar :* 37 foo foo\n*Time :* 11:00:00-14:00:00\n*Date :* 2016-12-23\n*Foo :* \n*bar* : 06XXXXXXXX
</code></pre>

<p>For now, I tried multiple solutions and the best working is this regex:</p>

<pre><code>/([^\\n])\w+/
</code></pre>

<p>but it it still not perfect. It doesn't take the special chars nor spaces into account.</p>