I have this text:
{{Infobox Item
|name = value
|prop2 = value
|prop3 = value
}}
it's from a mediawiki template.
i have the following regex:
preg_match('/\{\{Infobox Item.+\\n\}\}\\n/s', $text, $ra);
I'm using PHP.
I want to match the from {{Infobox Item
up to the first occurrence of }}
which is always going to be on a line by itself. The above regex will match from {{Infobox Item
to the end of another {{ }}
style block, which isn't what I want. How can I achieve this?
Code
Regular Expression
https://regex101.com/r/gC0oV1/1
Human Readable