Regex for capturing a character between a group but ignoring the ones in a nested group.
- by peroyomas
This is for make something similar to "templates" in MediaWiki with PHP in order to make the parameters between nested templates work.
Is possible with a regex to capture all occurrences of a character between braces but ignoring occurrences of it if it occurs in a nested group of braces?
| {{ | {{ | }} | | }} |
Highlighted:
| {{ *|* {{ | }} *|* *|* }} |