One more PCRE modifier that allows the use of duplicate named groups.
NOTE: only inline version is supported -
(?J), and must be placed at the start of the pattern.
If you use
the "val" group values will be never empty (will always be set). A similar effect can be achieved with branch reset though.