in reply to Match 2 same characters

Might I suggest that a C-style for loop combined with substr might be a more reasonable approach, especially since you want to match every character under the sun?

Update: The literal solution could be obtained using /(.)\1/ (see perlre).