L
Lucas Fialho
[Note: parts of this message were removed to make it a legal post.]
Hello everyone.
I'm trying to match the following pattern:
Text1\n
Text2\n
Text3---
Please note that Text3 can contain \n.
I tried using this regex:
/(.*?)\n(.*?)\n(.*?)---/
The pattern matches and I have three matches, but they're like this:
match[0] => "Text2\nText3---"
macth[1] => 'Text2'
match[2] => 'Text3'
How can I get the first one to be 'Text1' ?
Hello everyone.
I'm trying to match the following pattern:
Text1\n
Text2\n
Text3---
Please note that Text3 can contain \n.
I tried using this regex:
/(.*?)\n(.*?)\n(.*?)---/
The pattern matches and I have three matches, but they're like this:
match[0] => "Text2\nText3---"
macth[1] => 'Text2'
match[2] => 'Text3'
How can I get the first one to be 'Text1' ?