i have a regex problem. I want to get the text between two words with colon (like Example: or Epikrise:)
I have files (newLine is "\r\n").
Example of just two files: <<< start file 1>>> Test:\r\n blablabla1\r\n blablablabla2\r\n blablablablabla3\r\n blablablab4\r\n blablablaba5\r\n Test1:\r\n lalala1\r\n lalala2\r\n Hello3:\r\n mymymymy\r\n <<< end file 1>>> <<< start file 2>>> Test:\r\n blablabla1\r\n blablablabla2\r\n blablablablabla3\r\n blablablab4\r\n blablablaba5\r\n blablablaba6\r\n Test3:\r\n lalala1\r\n lalala2\r\n lalala3\r\n City:\r\n Gigi\r\n lulu\r\n Kuku\r\n <<< end file 2>>>
With a regexp I want to get all text between "Test:" to that next line with a string with ":"(colon) (for the examples "Test2:" for file 1 or "Test3:" for file 2
as result Test="blablabla1\r\n blablablabla2\r\n blablablablabla3\r\n blablablab4\r\n blablablaba5\r\n"
or Test="blablabla1\r\n blablablabla2\r\n blablablablabla3\r\n blablablab4\r\n blablablaba5\r\n blablablaba6\r\n" )
I tried (.+?(\r\n.+){1,}?(?!\w+?:)) but it does not work
Please help me..... Thanks
MurciaNew (Guido)
In reply to Regex get Text between two strings with colon by MurciaNew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |