I am trying to match any group of characters until a line break like this: \n
. I want to be able to access all groups matched then.
The text I am using to look for my regular expression is like this :
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
For now, I tried multiple solutions and the best working is this regex:
/([^\\n])\w+/
but it it still not perfect. It doesn't take the special chars nor spaces into account.