Your regex (as a whole) matches the "something else before" character as well - printing the content of a certain capture group is cheating! ;-)
In reply to Re^3: Using regex to match double letters, and only double letters
by Locutus
in thread Using regex to match double letters, and only double letters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |