I would like to have a regex that matches something like this:
%HORIZONTAL% may be "left" or "right" or "center"
%VERTICAL% may be "top" or "bottom" or "center"
I tried something like this:
And I got this:
Array(  => &align:left|center  => left  => top )
What would I have to change to get only one match at all? The  and  must not be possible.
Parentheses serve two purposes — grouping and capturing. To get the grouping you want without capturing the matches, use ?::
Manual reference: http://uk3.php.net/manual/en/regexp.reference.subpatterns.php