According to Kobi (see comments above):
PHP has no support for captures of the same group
Therefore this question has no solution.
More Related Contents:
- “Unknown modifier ‘g’ in…” when using preg_match in PHP?
- PHP regular expressions: No ending delimiter ‘^’ found in
- Delimiter must not be alphanumeric or backslash and preg_match
- preg_match(): Compilation failed: invalid range in character class at offset
- Optional Whitespace Regex
- Split camelCase word into words with php preg_match (Regular Expression)
- PHP – regex to allow letters and numbers only
- Extracting all values between curly braces regex php
- PHP’s preg_match() and preg_match_all() functions
- Function eregi() is deprecated [duplicate]
- Unknown modifier ‘/’ in …? what is it? [duplicate]
- How to search in an array with preg_match?
- How to get all captures of subgroup matches with preg_match_all()? [duplicate]
- How to validate a domain name using Regex & PHP?
- Regular expression preg_quote symbols are not detected
- Test if a string is regex
- PHP email validation [duplicate]
- How to validate that a string only contain lowercase letters?
- How to get the shortest rather than longest possible regex match with preg_match()
- Get non-numeric characters then number on each line of a block of texf
- Detecting a url using preg_match? without http:// in the string
- Regex to match an IP address [closed]
- How to remove accents and turn letters into “plain” ASCII characters? [duplicate]
- Regexp to add attribute in any xml tags
- How do I remove blank lines from text in PHP?
- Split alphanumeric string between leading digits and trailing letters
- Allow only [a-z][A-Z][0-9] in string using PHP
- My pattern isn’t matching a ISO style date, why? [duplicate]
- RegExp in preg_match function returning browser error
- PHP: Escape RegEx pattern to prevent being applied?