I want to get ${1} = Title, ${2} = Open, ${3} = Bla-bla-bla.
from
{{Title|Open
Bla-bla-bla
}}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What about something like this :
It’ll get you :
Which means that, after using
trimon$matches[1],$matches[2], and$matches[3], you’ll get what you asked for 🙂Explaining the regex :
^{characters, that have to be escaped, as they have a special meaning[^\|]+()so it’s captured — returned as the first part of the result|has to be escaped too.|character — that has to be escaped.[^\n]+()so it’s captured too — second part of the result.*virtually “anything” anynumber of times()so it’s captured too — third part of the result}(escaped, too)$And note the regex has the
s(dotall) modifier ; see Pattern Modifiers, about that.