Here are the data I receive :
I want to get only the message of the question. It is possible that my question is on several lines. For that I put "/s" at the end of my regex.
My regex is : /question : ((.|)*)\n?(line_1|line_2)/s
Example 1:
question : this is my question
line_1: 0
line_2: 1
Example 2 :
question : this is my question
line_2: 1
For my example 2 it's ok it works but for example 1 the condition "or" does not stop at the first occurrence found, do you have a solution ? Thanks for your help